summary refs log tree commit diff
path: root/chat.c
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 /chat.c
parentHandle nick errors (diff)
downloadcatgirl-c6cd59f5c8dd9a0853d8603224a5b55d374c9f11.tar.gz
catgirl-c6cd59f5c8dd9a0853d8603224a5b55d374c9f11.zip
Exit on zero read
Diffstat (limited to '')
-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;
400'>2020-08-25Support the pounce_env rc variableJune McEnroe 2020-08-25Remove deprecated option namesJune McEnroe The next release will be 2.0 so these can be removed now. 2020-08-25Document configuration and data file searchJune McEnroe 2020-08-24Use dataOpen for save fileJune McEnroe 2020-08-24Use configOpen to load localCAJune McEnroe 2020-08-24Use configPath to load client cert/privJune McEnroe 2020-08-24Use configOpen in getopt_configJune McEnroe 2020-08-24Import xdg.c from catgirlJune McEnroe 2020-08-23Replace “RAND_bytes” by “getentropy”Issam E. Maghni This removes the dependency on libcrypto. Signed-off-by: Issam E. Maghni <issam.e.maghni@mailbox.org> 2020-08-16contrib/palaver: Add no message preview flagsJune McEnroe 2020-08-13contrib/palaver: Don't set channel for PMsJune McEnroe 2020-08-13Fix unintended interception of NICK after registrationJune McEnroe Another bug caused by trying to support broken clients. I'm annoyed. 2020-08-12Add Additional Components section to READMEJune McEnroe 2020-08-12Document -L / palaver optionJune McEnroe 2020-08-11contrib/palaver: Document service configurationJune McEnroe 2020-08-11contrib/palaver: Add install target and rc scriptJune McEnroe 2020-08-11contrib/palaver: Implement command and notificationsJune McEnroe