summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-06-30 13:02:29 +0200
committercashmere <cashmere@autistici.org>2026-06-30 13:02:29 +0200
commitc0df8f4b0a0da63ff516ae2936d2b49190f8821e (patch)
treee51f6acda67820192425432ae6e518b3ec822824 /src
parented648a83def7218a935d27e96e9e1c53a70e1239 (diff)
downloadtelnet-c0df8f4b0a0da63ff516ae2936d2b49190f8821e.tar.gz
src/main.c: exclude disconnect message `Success`
Diffstat (limited to 'src')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 103ca2d..e90bbb7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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 */