summaryrefslogtreecommitdiff
path: root/extra/yassl/src/handshake.cpp
diff options
context:
space:
mode:
authormsvensson@neptunus.(none) <>2005-12-20 00:47:50 +0100
committermsvensson@neptunus.(none) <>2005-12-20 00:47:50 +0100
commite50c0fdc3b3b042c62df41cc0e7f637126772975 (patch)
treeec0c2404250dfd6f904366f00dbeb8688beda09e /extra/yassl/src/handshake.cpp
parentf9ef0df0d3aaab15b1a7245f8bf6785d24622c86 (diff)
downloadmariadb-git-e50c0fdc3b3b042c62df41cc0e7f637126772975.tar.gz
Bug #15772 Aborted YaSSL connections force threads into busyloops
- Report error when there is nothing to read after wait.
Diffstat (limited to 'extra/yassl/src/handshake.cpp')
-rw-r--r--extra/yassl/src/handshake.cpp6
1 files changed, 5 insertions, 1 deletions
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<input_buffer> 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;