diff options
author | msvensson@neptunus.(none) <> | 2005-12-20 00:47:50 +0100 |
---|---|---|
committer | msvensson@neptunus.(none) <> | 2005-12-20 00:47:50 +0100 |
commit | e50c0fdc3b3b042c62df41cc0e7f637126772975 (patch) | |
tree | ec0c2404250dfd6f904366f00dbeb8688beda09e /extra/yassl | |
parent | f9ef0df0d3aaab15b1a7245f8bf6785d24622c86 (diff) | |
download | mariadb-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')
-rw-r--r-- | extra/yassl/src/handshake.cpp | 6 |
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; |