summaryrefslogtreecommitdiff
path: root/src/tls.c
diff options
context:
space:
mode:
authorgourav <gouravr@amazon.com>2021-07-14 00:46:33 -0700
committerGitHub <noreply@github.com>2021-07-14 10:46:33 +0300
commit7ac42ab7b3cce3c656c30008dfd7162be5ac460a (patch)
tree567c0e5534d8337975caba9d7fa102cb2f8552ac /src/tls.c
parentd0f36eeda013213919afe89bbc8a1d5bb3c94340 (diff)
downloadredis-7ac42ab7b3cce3c656c30008dfd7162be5ac460a.tar.gz
Return -1 when connTLSWrite fails to write due to socket being closed (#9222)
Diffstat (limited to 'src/tls.c')
-rw-r--r--src/tls.c2
1 files changed, 1 insertions, 1 deletions
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;