summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-04 01:38:43 -0400
committerJune McEnroe <june@causal.agency>2018-08-04 01:38:43 -0400
commitc6cd59f5c8dd9a0853d8603224a5b55d374c9f11 (patch)
treead82f6fdb4dedda3d66c3009d5e8b2a99ae686a8
parentHandle nick errors (diff)
downloadcatgirl-c6cd59f5c8dd9a0853d8603224a5b55d374c9f11.tar.gz
catgirl-c6cd59f5c8dd9a0853d8603224a5b55d374c9f11.zip
Exit on zero read
-rw-r--r--chat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/chat.c b/chat.c
index 20a4290..239e390 100644
--- a/chat.c
+++ b/chat.c
@@ -460,6 +460,11 @@ static void clientRead(void) {
 
 	ssize_t size = tls_read(client.tls, buf + fill, sizeof(buf) - fill);
 	if (size < 0) errx(EX_IOERR, "tls_read: %s", tls_error(client.tls));
+	if (!size) {
+		// FIXME: Always endwin
+		endwin();
+		exit(EX_OK);
+	}
 	fill += size;
 
 	char *end, *line = buf;
>Add another BACKXWASH showJune McEnroe It was good! 2024-06-16Update bioJune McEnroe 2024-06-15Add photo descriptions from June 12June McEnroe 2024-06-10Add first roll of film from June 8June McEnroe 2024-06-10Cope with not having an EXIF infoJune McEnroe 2024-06-10Resize using target pixel counts for consistencyJune McEnroe This will resize film scans to about the same size as for the digital photos. 2024-06-10Add The Girl Who Was Convinced...June McEnroe Not much there. The illustrations are very nice though. 2024-06-09Add photos from May 31June McEnroe 2024-06-09Use monospace on photo pagesJune McEnroe 2024-06-09Put lens and (future) film at the tops of photo pagesJune McEnroe 2024-05-22Remove use of sysexits.hJune McEnroe 2024-05-22Add photo descriptions from 05-03 and 05-06June McEnroe 2024-05-21Fix = precedence in whenJune McEnroe