commit a99970d7a3c9482e191af51b9a0d386cac647f66
parent 4ce1ab8a2632c1676235b51b00f4469e96966c7c
Author: Drew DeVault <sir@cmpwn.com>
Date: Tue, 22 Mar 2016 06:53:29 -0400
Merge pull request #530 from mikkeloscar/swaybar-kill-on-sway-crash
swaybar: Abort when receiving 0 bytes in IPC call
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/ipc-client.c b/common/ipc-client.c
@@ -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;