From 7ac42ab7b3cce3c656c30008dfd7162be5ac460a Mon Sep 17 00:00:00 2001 From: gourav Date: Wed, 14 Jul 2021 00:46:33 -0700 Subject: Return -1 when connTLSWrite fails to write due to socket being closed (#9222) --- src/tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tls.c b/src/tls.c index 611c6dcc6..950da5db3 100644 --- a/src/tls.c +++ b/src/tls.c @@ -759,7 +759,7 @@ static int connTLSWrite(connection *conn_, const void *data, size_t data_len) { if (ssl_err == SSL_ERROR_ZERO_RETURN || ((ssl_err == SSL_ERROR_SYSCALL && !errno))) { conn->c.state = CONN_STATE_CLOSED; - return 0; + return -1; } else { conn->c.state = CONN_STATE_ERROR; return -1; -- cgit v1.2.1