Skip to content

Commit 21a8667

Browse files
author
Cliff Jansen
committed
QPID-8527: Fix hang in qpidd with TLS connections.
1 parent d0bf9e3 commit 21a8667

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/qpid/sys/posix/AsynchIO.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "qpid/sys/Probes.h"
2828
#include "qpid/sys/DispatchHandle.h"
2929
#include "qpid/sys/Time.h"
30+
#include "qpid/sys/ssl/SslSocket.h"
3031
#include "qpid/log/Statement.h"
3132

3233
// TODO The basic algorithm here is not really POSIX specific and with a
@@ -461,6 +462,12 @@ void AsynchIO::readable(DispatchHandle& h) {
461462
// Stop reading if we've overrun our timeslot
462463
if ( duration > threadMaxIoTimeNs) {
463464
QPID_PROBE4(asynchio_read_finished_maxtime, &h, duration, total, readCalls);
465+
// epoll cannot see into an SslSocket's buffered input and may hang.
466+
const qpid::sys::ssl::SslSocket *s = dynamic_cast<const qpid::sys::ssl::SslSocket *>(&socket);
467+
if (s) {
468+
// Schedule a future readble callback. QPID-8527
469+
call(boost::bind(&AsynchIO::readable, this, _1));
470+
}
464471
break;
465472
}
466473

0 commit comments

Comments
 (0)