aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-03-22 06:53:29 -0400
committerDrew DeVault <sir@cmpwn.com>2016-03-22 06:53:29 -0400
commita99970d7a3c9482e191af51b9a0d386cac647f66 (patch)
tree27246e135aa3184f9e0a4cd7721e486097c4807d /common
parent4ce1ab8a2632c1676235b51b00f4469e96966c7c (diff)
parent1d010afbf72355eae0fdffa249f2588cb801c302 (diff)
Merge pull request #530 from mikkeloscar/swaybar-kill-on-sway-crash
swaybar: Abort when receiving 0 bytes in IPC call
Diffstat (limited to 'common')
-rw-r--r--common/ipc-client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/ipc-client.c b/common/ipc-client.c
index 81348913..93f2963c 100644
--- 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;