This is an automated email from the ASF dual-hosted git repository.

cliffjansen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 21a8667  QPID-8527: Fix hang in qpidd with TLS connections.
21a8667 is described below

commit 21a866749828aa2354234e4c5d3d1cc8ef2b9a80
Author: Cliff Jansen <cliffjan...@apache.org>
AuthorDate: Thu May 20 07:34:11 2021 -0700

    QPID-8527: Fix hang in qpidd with TLS connections.
---
 src/qpid/sys/posix/AsynchIO.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/qpid/sys/posix/AsynchIO.cpp b/src/qpid/sys/posix/AsynchIO.cpp
index a05e66f..9b842f3 100644
--- a/src/qpid/sys/posix/AsynchIO.cpp
+++ b/src/qpid/sys/posix/AsynchIO.cpp
@@ -27,6 +27,7 @@
 #include "qpid/sys/Probes.h"
 #include "qpid/sys/DispatchHandle.h"
 #include "qpid/sys/Time.h"
+#include "qpid/sys/ssl/SslSocket.h"
 #include "qpid/log/Statement.h"
 
 // TODO The basic algorithm here is not really POSIX specific and with a
@@ -461,6 +462,12 @@ void AsynchIO::readable(DispatchHandle& h) {
                 // Stop reading if we've overrun our timeslot
                 if ( duration > threadMaxIoTimeNs) {
                     QPID_PROBE4(asynchio_read_finished_maxtime, &h, duration, 
total, readCalls);
+                    // epoll cannot see into an SslSocket's buffered input and 
may hang.
+                    const qpid::sys::ssl::SslSocket *s = dynamic_cast<const 
qpid::sys::ssl::SslSocket *>(&socket);
+                    if (s) {
+                        // Schedule a future readble callback.  QPID-8527
+                        call(boost::bind(&AsynchIO::readable, this, _1));
+                    }
                     break;
                 }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to