From 28999410c865cf38bbaf107a76bd3c66e7b7b414 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 20 Dec 2005 00:47:50 +0100 Subject: Bug #15772 Aborted YaSSL connections force threads into busyloops - Report error when there is nothing to read after wait. extra/yassl/src/handshake.cpp: Report error if there is nothing to read after a blocking read --- extra/yassl/src/handshake.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'extra') diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp index 45dfb6fa032..d7df438b8df 100644 --- a/extra/yassl/src/handshake.cpp +++ b/extra/yassl/src/handshake.cpp @@ -656,7 +656,11 @@ DoProcessReply(SSL& ssl, mySTL::auto_ptr buffered) { ssl.getSocket().wait(); // wait for input if blocking uint ready = ssl.getSocket().get_ready(); - if (!ready) return buffered; + if (!ready) { + // Nothing to receive after blocking wait => error + ssl.SetError(receive_error); + return buffered= null_buffer; + } // add buffered data if its there uint buffSz = buffered.get() ? buffered.get()->get_size() : 0; -- cgit v1.2.1