-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10044/
-----------------------------------------------------------
(Updated April 19, 2013, 3:57 p.m.)
Review request for qpid, Rafael Schloming and Justin Ross.
Changes
-------
Changed exception name to ContentError
Description
-------
If there is an exception when encrypting or decrypting a message, the python
client will be in an unusable state. It will not be possible to send any other
messages or even close the connection.
The cause of this is that the connection class stores any exceptions that occur
and returns them to the application. Those exceptions are never cleared and
block any further activity.
This proposed fix:
- Creates a new exception type: NonBlockingError.
- Encode and decode exception are caught and converted to NonBlockingErrors.
- When a NonBlockingError is encountered, it is returned to the application and
then cleared so future calls can continue.
This addresses bug qpid-2453.
https://issues.apache.org/jira/browse/qpid-2453
Diffs (updated)
-----
trunk/qpid/python/qpid/messaging/driver.py 1469528
trunk/qpid/python/qpid/messaging/endpoints.py 1469528
trunk/qpid/python/qpid/messaging/exceptions.py 1469528
Diff: https://reviews.apache.org/r/10044/diff/
Testing
-------
Attached test-nonblock.py will send and receive several messages. One of the
messages will cause an encode exception.
Before the patch, the exception will prevent further messages from being sent
and prevent the connection from being closed.
After the patch, the bad message will raise an exception, further messages can
be sent and the connection can be closed.
Thanks,
Ernie Allen