summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/client.c b/client.c
index 906b718..ac73003 100644
--- a/client.c
+++ b/client.c
@@ -90,6 +90,10 @@ static void client_haveIn(epoll_client_t *client)
if (ret <= 0) {
int err = SSL_get_error(client->ssl, ret);
if (SSL_BLOCKED(err)) break;
+ if (err == SSL_ERROR_ZERO_RETURN) {
+ SSL_shutdown(client->ssl);
+ // Might have to handle error return codes; need another state in epoll_client_t for this
+ }
printf("[Proxy] SSL client gone while reading (ret=%d, err=%d).\n", (int)ret, err);
client->kill = TRUE;
return;