summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c4
1 files changed, 2 insertions, 2 deletions
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;
 	}