diff options
-rw-r--r-- | client.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) { |