From bc98f29eed4e03c5dc9b78bf4978ec7d490a5521 Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Tue, 13 Feb 2007 23:17:53 +0100 Subject: [PATCH] Minor epoll fixes. --- jam.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/jam.c b/jam.c index c1f9bb1..0141e5b 100644 --- a/jam.c +++ b/jam.c @@ -278,7 +278,7 @@ void *sender_worker(void *arg) if (s->bytes_left == 0) { if (epoll_ctl(ep_fd, EPOLL_CTL_DEL, s->fd, NULL) == -1) { - perror("EPOLL_CTL_ADD"); + perror("EPOLL_CTL_DEL"); exit(1); } close(s->fd); @@ -366,13 +366,11 @@ void *receiver_worker(void *arg) ret = read(sock, buf, 65536); if (ret == 0) { - close(sock); - if (epoll_ctl(ep_fd, EPOLL_CTL_DEL, sock, NULL) == -1) { - perror("EPOLL_CTL_ADD"); + perror("EPOLL_CTL_DEL"); exit(1); } - + close(sock); continue; } -- 2.39.2