summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/client.c b/client.c
index ac73003..2fbc560 100644
--- a/client.c
+++ b/client.c
@@ -80,6 +80,7 @@ static void client_haveIn(epoll_client_t *client)
if (ret < 0 && errno == EINTR) continue;
if (ret < 0 && errno == EAGAIN) break;
if (ret <= 0) {
+ if (client->kill) return;
printf("[Proxy] Client gone while reading (ret=%d, errno=%d).\n", (int)ret, errno);
client->kill = TRUE;
return;
@@ -88,6 +89,7 @@ static void client_haveIn(epoll_client_t *client)
// SSL
ret = SSL_read(client->ssl, client->readBuffer + client->rbPos, buflen);
if (ret <= 0) {
+ if (client->kill) return;
int err = SSL_get_error(client->ssl, ret);
if (SSL_BLOCKED(err)) break;
if (err == SSL_ERROR_ZERO_RETURN) {