summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/server.c b/server.c
index 80d34df..ce5ae87 100644
--- a/server.c
+++ b/server.c
@@ -130,6 +130,7 @@ void serverRecv(void) {
 	ssize_t read = tls_read(client, &buf[len], sizeof(buf) - len);
 	if (read == TLS_WANT_POLLIN || read == TLS_WANT_POLLOUT) return;
 	if (read < 0) errx(EX_IOERR, "server tls_read: %s", tls_error(client));
+	if (!read) errx(EX_PROTOCOL, "server closed connection");
 	len += read;
 
 	char *crlf;