diff options
| author | cashmere <cashmere@autistici.org> | 2026-06-30 13:02:29 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-06-30 13:02:29 +0200 |
| commit | c0df8f4b0a0da63ff516ae2936d2b49190f8821e (patch) | |
| tree | e51f6acda67820192425432ae6e518b3ec822824 | |
| parent | ed648a83def7218a935d27e96e9e1c53a70e1239 (diff) | |
| download | telnet-c0df8f4b0a0da63ff516ae2936d2b49190f8821e.tar.gz | |
src/main.c: exclude disconnect message `Success`
| -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 */ |
