-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11319/
-----------------------------------------------------------
Review request for qpid, Alan Conway and Rafael Schloming.
Description
-------
This is a hack (yes, a _HACK_) to work around the behavior of python's SSL
implementation.
When the SSL socket cannot complete a read() or write() operation without
performing it's opposite (a write() or read() operation), it will throw an
SSL_ERROR_WANT_READ/WRITE exception. To resume the failed operation, the code
must re-invoke the read() or write() with _exactly_ the same parameters as were
passed when the call threw the exception.
This is due to the underlying OpenSSL implementation requirements.
Originally, when writing we passed the string buffer that holds output data.
This string buffer can be appended with new write data between the successive
calls to write(), which will cause the underlying pointer to change. This fix
tracks the original buffer passed to the failing call, and retries the call
using that.
Originally, each call to recv() would return a new buffer. This patch
introduces a bytearray-based buffer that can be preserved across a read retry.
Not 100% enamored by this patch, if anyone has a better approach I'm all
ears....
This addresses bug qpid-4872.
https://issues.apache.org/jira/browse/qpid-4872
Diffs
-----
/trunk/qpid/python/qpid/messaging/transports.py 1484491
Diff: https://reviews.apache.org/r/11319/diff/
Testing
-------
Reproduced the failure both with and without the patch. No exceptions thrown
with the patch in place.
Thanks,
Kenneth Giusti