فهرست منبع

Merge pull request #11658 from afishbeck/roxiePersistentSSLAssertion

HPCC-20369 Fix Roxie SSL connection logs assertion after timeout

Reviewed-By: Yanrui Ma <yanrui.ma@lexisnexisrisk.com>
Reviewed-By: Mark Kelly <mark.kelly@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 6 سال پیش
والد
کامیت
216c5a421e
2فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 2 0
      common/thorhelper/roxiehelper.cpp
  2. 2 0
      system/security/securesocket/securesocket.cpp

+ 2 - 0
common/thorhelper/roxiehelper.cpp

@@ -1466,6 +1466,8 @@ bool CSafeSocket::readBlock(StringBuffer &ret, unsigned timeout, HttpHelper *pHt
         try
         {
             sock->read(&len, sizeof (len), sizeof (len), bytesRead, timeout);
+            if (bytesRead==0) //graceful timeout
+                return false;
         }
         catch (IJSOCK_Exception *E)
         {

+ 2 - 0
system/security/securesocket/securesocket.cpp

@@ -783,6 +783,8 @@ void CSecureSocket::readTimeout(void* buf, size32_t min_size, size32_t max_size,
             int err = SSL_get_error(m_ssl, rc);
             // Ignoring SSL_ERROR_SYSCALL because IE prompting user acceptance of the certificate 
             // causes this error, but is harmless.
+            // Ignoring SSL_ERROR_SYSCALL also seems to ignore the timeout value being exceeded,
+            //    but for persistence at least, treating zero bytes read can be treated as a graceful completion of connection
             if((err != SSL_ERROR_NONE) && (err != SSL_ERROR_SYSCALL))
             {
                 if(m_loglevel >= SSLogMax)