You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Justin Ross <jr...@apache.org> on 2013/04/18 15:13:10 UTC
Re: Review Request: QPID-2453 Python messaging client unusable after
receiving a malformed message
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10044/#review19386
-----------------------------------------------------------
The naming for the new exceptions doesn't quite make sense to me. Do the existing exceptions indeed cause the connection to block? I thought they instead caused subsequent api calls to error out.
- Justin Ross
On March 20, 2013, 2:04 p.m., Ernie Allen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10044/
> -----------------------------------------------------------
>
> (Updated March 20, 2013, 2:04 p.m.)
>
>
> Review request for qpid, Rafael Schloming and Justin Ross.
>
>
> 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
> -----
>
> trunk/qpid/python/qpid/messaging/driver.py 1457042
> trunk/qpid/python/qpid/messaging/endpoints.py 1457042
> trunk/qpid/python/qpid/messaging/exceptions.py 1457042
>
> 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
>
>