ticl

tiny irc channel linker
git clone git://git.ircforever.org/ticl
Log | Files | Refs | Submodules | README | LICENSE

commit 99aaa335c1a504b5210fd9e354a49749cec5c88b
parent 93e6ec6e9bef1c1bc2b3fa75836b422aa96ca13b
Author: libredev <libredev@ircforever.org>
Date:   Sat, 19 Nov 2022 20:06:47 +0530

abort on connection close

Diffstat:
Mmain.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/main.c b/main.c @@ -204,9 +204,11 @@ handle_server_output(int id) if ((n = readline(pfdset[id].fd, buffer, sizeof(buffer))) < 1) { if (n == 0) { printf("error: remote host closed connection: %s\n", strerror(errno)); + terminate(1); /* fd_del(pfdset[id].fd); */ } else if ((errno != EAGAIN) && (errno != EINTR)) { printf("error: read: %s\n", strerror(errno)); + terminate(1); } return; }