[ 
https://issues.apache.org/jira/browse/PROTON-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17519017#comment-17519017
 ] 

Ievgen Popovych commented on PROTON-1515:
-----------------------------------------

I'd like to revive this issue.

The issue for me is that proton _knows_ that remote end of the transport is 
dead, but will still use it until a heartbeat discovers that local end is dead 
as well (to my best understanding and recollection).

I've implemented a small change for {{EndpointStateHandler}} to change behavior 
of {{on_transport_tail_closed}}:
{code:python}
class ReliableEndpointStateHandler(EndpointStateHandler):
    def on_transport_tail_closed(self, event: Event):
        super().on_transport_tail_closed(event)

        # immediately close another end so that we realize that transport is 
actually dead;
        # this is a fix/WA for slow reconnection and lack of realization that 
transport is broken on socket errors
        if not event.transport.closed:
            self.logger.warning(f"Closing transport head on tail close.")
            event.transport.close_head()
{code}
I am not entirely sure this is correct and so did not post this as a patch.

> Python sender client doesn't check actual link state and continues to send 
> messages even if link is down
> --------------------------------------------------------------------------------------------------------
>
>                 Key: PROTON-1515
>                 URL: https://issues.apache.org/jira/browse/PROTON-1515
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding
>         Environment: RHEL7.3
> Jboss AMQ 7
> python-qpid-proton.x86_64-0.14.0-1.el7
>            Reporter: Dmitrii Puzikov
>            Assignee: Justin Ross
>            Priority: Major
>         Attachments: sender.log
>
>
> Steps to reproduce:
> 1. Start broker
> 2. Create queue
> 3. Start sending e.g. 10 messages with python sender
> 4. Kill broker
> 5. Notice that client continues send messages and raises exception only after 
> all 10 messages were sent.
> Actual behavior: Python sender client ignores link failure until all messages 
> were sent and only then raises an exception/ begins re-connection attempts.
> Expected behavior: Client should stop sending messages and raise exception or 
> try to begin re-connection attempts if reconnect option is set.
> Please, see sender.log. Global handler was added for event logging purposes. 
> It just prints event/handler name.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to