diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -52,7 +52,7 @@ int process_message(struct pollfd *fds, nfds_t *nfds) { read(fds[i].fd, buffer, sizeof(buffer)); /* read the message which the client sent */ /* if message of the client returns an error */ - if (message <= 0) { + if (message < 0) { /* close the connection if client disappeared or disconnected */ close(fds[i].fd); fds[i] = fds[*nfds - 1]; /* move back last slot */ |
