diff options
author | Simon Rettberg | 2017-06-01 17:43:55 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-06-01 17:43:55 +0200 |
commit | e33e0b1c7c3982ce1f453a1021fa2fcd89613abb (patch) | |
tree | a213617c4563d1006cc7e422ddea41dd83fedc71 | |
parent | Make print filter function output identical to usual string representation of... (diff) | |
download | ldadp-e33e0b1c7c3982ce1f453a1021fa2fcd89613abb.tar.gz ldadp-e33e0b1c7c3982ce1f453a1021fa2fcd89613abb.tar.xz ldadp-e33e0b1c7c3982ce1f453a1021fa2fcd89613abb.zip |
Don't try to keep reading or report errors if client's kill flag is set
-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) { |