summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-27 00:24:48 -0400
committerJune McEnroe <june@causal.agency>2019-10-27 00:24:48 -0400
commit8b8e2b5165e171e75d2299115f89057f25322a68 (patch)
tree38d18adb3d6840ca2b987cc047d4f4484f9b22ac
parentExplicitly tls_handshake new clients (diff)
downloadpounce-8b8e2b5165e171e75d2299115f89057f25322a68.tar.gz
pounce-8b8e2b5165e171e75d2299115f89057f25322a68.zip
Drop clients on zero-length reads
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;
 	}
ht'> 2019-07-27Revert "Use scheme to style HTMLs"June McEnroe This reverts commit 46237a457ff3c9a813a56f2a442c115bf8610cbc. I don't know why but I don't like it. 2019-07-27Remove scheme text linkJune McEnroe No standard base64 encoder so no way to maintain it. 2019-07-26Update Dark.terminalJune McEnroe Why are the blobs so much bigger now? 2019-07-26Lighten dark whiteJune McEnroe 2019-07-25Add png.3 man pageJune McEnroe 2019-07-25Use scheme to style HTMLsJune McEnroe 2019-07-25Don't match comments in strings in makeJune McEnroe 2019-07-25Generate index.html with links from bin.7June McEnroe 2019-07-24Warn when date has changedJune McEnroe 2019-07-24Add whenJune McEnroe When? Now. 2019-07-24Remove histedit from bitJune McEnroe