From 8b8e2b5165e171e75d2299115f89057f25322a68 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sun, 27 Oct 2019 00:24:48 -0400 Subject: Drop clients on zero-length reads --- client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index 198f1f6..7aa2584 100644 --- a/client.c +++ b/client.c @@ -225,8 +225,8 @@ void clientRecv(struct Client *client) { &client->buf[client->len], sizeof(client->buf) - client->len ); if (read == TLS_WANT_POLLIN || read == TLS_WANT_POLLOUT) return; - if (read < 0) { - warnx("tls_read: %s", tls_error(client->tls)); + if (read <= 0) { + if (read < 0) warnx("tls_read: %s", tls_error(client->tls)); client->error = true; return; } -- cgit 1.4.1