Re: QPID Proton 0.19 connection.close() does not close remote connection

2018-02-22 Thread Gordon Sim

On 22/02/18 07:53, andi welchlin wrote:

Hello Gordon,

thank you for the hint. This was exactly what I needed.
Now I call close and in the method on_connection_closed() I stop the
container.
The connection is then closed remotely.

Would be nice to reflect this in the Proton examples.


When the container has nothing left to do, e.g. if the last socket 
closes and is removed from the loop and there are no timer actions 
pending or anything, it will automatically exit. The examples mostly 
rely on that.


-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: QPID Proton 0.19 connection.close() does not close remote connection

2018-02-21 Thread andi welchlin
Hello Gordon,

thank you for the hint. This was exactly what I needed.
Now I call close and in the method on_connection_closed() I stop the
container.
The connection is then closed remotely.

Would be nice to reflect this in the Proton examples.

Kind Regards,
Andreas

On Wed, Feb 21, 2018 at 10:36 PM, Gordon Sim  wrote:

> On 21/02/18 21:33, andi welchlin wrote:
>
>> Hello all,
>>
>> I connected a Proton MessagingHandler (Python3) to a QPID C++ Broker 0.37.
>>
>> I want to close the handler gracefully but I could not manage to do so.
>>
>> When I call connection.close() the state is afterwards: LOCAL_UNINIT,
>> REMOTE_ACTIVE
>>
>> So it does not close the remote connection (or the broker does not close
>> it).
>>
>> When I connect to the broker with qpid-tool, I can see that the client is
>> still there.
>>
>> What is the right way to close a MessagingHandler and all its connections?
>>
>
> That is the right method to call. However it is asynchronous, so the
> connection won't be closed when the method returns. You will get a
> connection_closed event when the remote side echoes the close.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
>
>


Re: QPID Proton 0.19 connection.close() does not close remote connection

2018-02-21 Thread Gordon Sim

On 21/02/18 21:33, andi welchlin wrote:

Hello all,

I connected a Proton MessagingHandler (Python3) to a QPID C++ Broker 0.37.

I want to close the handler gracefully but I could not manage to do so.

When I call connection.close() the state is afterwards: LOCAL_UNINIT,
REMOTE_ACTIVE

So it does not close the remote connection (or the broker does not close
it).

When I connect to the broker with qpid-tool, I can see that the client is
still there.

What is the right way to close a MessagingHandler and all its connections?


That is the right method to call. However it is asynchronous, so the 
connection won't be closed when the method returns. You will get a 
connection_closed event when the remote side echoes the close.


-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org