summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bounce.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bounce.c b/bounce.c
index 2b1413d..8dc2850 100644
--- a/bounce.c
+++ b/bounce.c
@@ -413,7 +413,10 @@ int main(int argc, char *argv[]) {
 			if (!revents) continue;
 
 			if (event.fds[i].fd == server) {
-				serverRecv();
+				if (revents & POLLIN) serverRecv();
+				if (revents & (POLLHUP | POLLERR)) {
+					errx(EX_UNAVAILABLE, "server closed connection");
+				}
 				continue;
 			}
 
airsJune McEnroe 2018-08-05Refactor color initializationJune McEnroe 2018-08-05Add ^L redrawJune McEnroe 2018-08-05Use 16 colors if availableJune McEnroe 2018-08-05Limit parsed colors to number of mIRC colorsJune McEnroe 2018-08-04Show source link on exitJune McEnroe 2018-08-04Implement line editing, scrollingJune McEnroe 2018-08-04Handle /topicJune McEnroe