mirror of
https://github.com/swaywm/sway.git
synced 2024-11-10 20:44:01 +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
@ -47,7 +47,7 @@ struct ipc_response *ipc_recv_response(int socketfd) {
|
||||
size_t total = 0;
|
||||
while (total < ipc_header_size) {
|
||||
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");
|
||||
}
|
||||
total += received;
|
||||
|
Loading…
Reference in New Issue
Block a user