mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
Merge pull request #530 from mikkeloscar/swaybar-kill-on-sway-crash
swaybar: Abort when receiving 0 bytes in IPC call
This commit is contained in:
commit
a99970d7a3
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ struct ipc_response *ipc_recv_response(int socketfd) {
|
||||||
size_t total = 0;
|
size_t total = 0;
|
||||||
while (total < ipc_header_size) {
|
while (total < ipc_header_size) {
|
||||||
ssize_t received = recv(socketfd, data + total, ipc_header_size - total, 0);
|
ssize_t received = recv(socketfd, data + total, ipc_header_size - total, 0);
|
||||||
if (received < 0) {
|
if (received <= 0) {
|
||||||
sway_abort("Unable to receive IPC response");
|
sway_abort("Unable to receive IPC response");
|
||||||
}
|
}
|
||||||
total += received;
|
total += received;
|
||||||
|
|
Loading…
Reference in a new issue