diff options
author | Simon Rettberg | 2017-04-21 15:04:06 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-04-21 15:04:06 +0200 |
commit | bd1a974e669c9dc206d56ae2bc768b305fba53d5 (patch) | |
tree | 8890e70c1268e8e7810e127b3a6e06c2cd3822ae | |
parent | Introduce lowercase homeattr, update server last activity properly (diff) | |
download | ldadp-bd1a974e669c9dc206d56ae2bc768b305fba53d5.tar.gz ldadp-bd1a974e669c9dc206d56ae2bc768b305fba53d5.tar.xz ldadp-bd1a974e669c9dc206d56ae2bc768b305fba53d5.zip |
client.c: Shutdown SSL connection if peer requests so
-rw-r--r-- | client.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |