You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2021/04/02 15:38:18 UTC

[GitHub] [qpid-proton] cliffjansen commented on pull request #304: PROTON-2344: fix Python BlockingConnection resource leaks, memory and…

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org