cliffjansen commented on pull request #304:
URL: https://github.com/apache/qpid-proton/pull/304#issuecomment-812582546
BlockingConnection.close() must ensure eventual cleanup of all resources by
the time it returns and be resilient against exceptions.
The strategy under the old C reactor and IO code was to update connection
properties to generate the close frame and when there was no remaining
possibility of blocking operations to run the reactor to clean up all
resources. Some previous bug fix required stopping the reactor early and
allowing the C object reference counting to promote the cleanup.
With the new Python IO, the strategy is the same but slightly different
mechanisms are required.
This patch:
- does a Transport.close_tail to prevent blocking waiting for the peer
close frame (which may never be sent)
- removes the early stop() so that Reactor cleanup can complete,
especially Selectable and socket closing.
- prevents mistaking a local close with an external disconnect.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]