Commit 28999410 authored by unknown's avatar unknown
Browse files

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
parent d920097a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;