From c9b60eca271810cc872dbe34d670057cecceaaab Mon Sep 17 00:00:00 2001 From: Adam Potolsky Date: Wed, 24 Jun 2015 10:34:19 -0700 Subject: [PATCH] Changed secure connest and accept to match read/write retry logic #4750 --- src/lib/plugin/ns/SecureSocket.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/plugin/ns/SecureSocket.cpp b/src/lib/plugin/ns/SecureSocket.cpp index b753188a..a898e5a8 100644 --- a/src/lib/plugin/ns/SecureSocket.cpp +++ b/src/lib/plugin/ns/SecureSocket.cpp @@ -429,11 +429,19 @@ SecureSocket::checkResult(int status, int& retry) break; case SSL_ERROR_WANT_CONNECT: - case SSL_ERROR_WANT_ACCEPT: + m_writable = true; + m_readable = true; retry++; LOG((CLOG_DEBUG2 "want to connect, error=%d, attempt=%d", errorCode, retry)); break; + case SSL_ERROR_WANT_ACCEPT: + m_writable = true; + m_readable = true; + retry++; + LOG((CLOG_DEBUG2 "want to accept, error=%d, attempt=%d", errorCode, retry)); + break; + case SSL_ERROR_SYSCALL: LOG((CLOG_ERR "ssl error occurred (system call failure)")); if (ERR_peek_error() == 0) {