Differences From Artifact [01687732e1]:
- File src/tls/OFOpenSSLTLSStream.m — part of check-in [1a86b8175b] at 2022-02-12 07:46:07 on branch trunk — Update copyright (user: js, size: 10285) [annotate] [blame] [check-ins using]
To Artifact [2ce21e69b2]:
- File src/tls/OFOpenSSLTLSStream.m — part of check-in [da02ae46f0] at 2022-03-10 19:37:44 on branch trunk — OFOpenSSLTLSStream: Fix stuck reads (user: js, size: 10508) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
120 121 122 123 124 125 126 | (int)tmp); } @catch (OFReadFailedException *e) { if (e.errNo != EWOULDBLOCK && e.errNo != EAGAIN) @throw e; } } | | > > > > > > > > > > > | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | (int)tmp); } @catch (OFReadFailedException *e) { if (e.errNo != EWOULDBLOCK && e.errNo != EAGAIN) @throw e; } } ret = SSL_read_ex(_SSL, buffer, length, &bytesRead); if (BIO_ctrl_pending(_writeBIO) > 0) { int tmp = BIO_read(_writeBIO, _buffer, bufferSize); OFEnsure(tmp >= 0); [_underlyingStream writeBuffer: _buffer length: tmp]; [_underlyingStream flushWriteBuffer]; } if (ret != 1) { /* * The underlying stream might have had data ready, but not * enough for OpenSSL to return decrypted data. This means the * caller might have observed the TLS stream for reading, got a * ready signal and read - and expects the read to succeed, not * to fail with EWOULDBLOCK, as it was signaled ready. * Therefore, return 0, as we could read 0 decrypted bytes, but |
︙ | ︙ |