diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2019-08-12 19:10:43 +0100 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2019-08-12 19:10:43 +0100 |
commit | c7cbdf0139cae2445b62df2af5f7a64b4ab925dc (patch) | |
tree | 4a0d7e5dccace2dc4bc4f630f06f2b0cf278e067 | |
parent | 4b9165a7f4f0461cdc16e95804c8ccc5cab50644 (diff) | |
download | imv-c7cbdf0139cae2445b62df2af5f7a64b4ab925dc.tar.gz |
ipc: Handle closed socket correctly
-rw-r--r-- | src/ipc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -35,7 +35,7 @@ void *wait_for_commands(void* void_conn) while (1) { char buf[1024]; ssize_t len = recv(conn->fd, buf, sizeof buf - 1, 0); - if (len == -1) { + if (len <= 0) { break; } |