diff options
author | aabacchus <ben@bvnf.space> | 2023-05-27 19:26:05 +0100 |
---|---|---|
committer | aabacchus <ben@bvnf.space> | 2023-05-27 19:26:05 +0100 |
commit | 23e183268d28a58e763ba81716ddd52d35e65df8 (patch) | |
tree | adb463e8a5b952c42d35ccd88a7c6a437639e916 | |
parent | 72925c599a0870ada9100a69aa6500b04d0fd84e (diff) | |
download | cbot-23e183268d28a58e763ba81716ddd52d35e65df8.tar.gz |
don't try to reconnect, just quit
-rw-r--r-- | receive.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/receive.c b/receive.c index 9b620e1..169ebba 100644 --- a/receive.c +++ b/receive.c @@ -234,13 +234,15 @@ main(void) { handle_irc(fds[1].fd); } if (fds[1].revents & POLLHUP) { - fprintf(stderr, "IRC disconnected; trying to reconnect\n"); close(fds[1].fd); - fds[1].fd = connect_irc(); - /* could exit(3) in connect_irc */ + if (fds[2].fd >= 0) + close(fds[2].fd); + close(fds[0].fd); + errx(1, "IRC disconnected; exiting"); } } close(fds[0].fd); + return 0; } #else int main(void) { |