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 16:09:52 UTC
[GitHub] [qpid-proton] astitcher commented on a change in pull request #304: PROTON-2344: fix Python BlockingConnection resource leaks, memory and…
astitcher commented on a change in pull request #304:
URL: https://github.com/apache/qpid-proton/pull/304#discussion_r606305168
##########
File path: python/proton/_utils.py
##########
@@ -440,11 +440,16 @@ def close(self):
self.conn.close()
self.wait(lambda: not (self.conn.state & Endpoint.REMOTE_ACTIVE),
msg="Closing connection")
+ if self.conn.transport:
+ # Close tail to force transport cleanup without waiting/hanging for peer close frame.
+ self.conn.transport.close_tail()
finally:
self.conn.free()
# Nothing left to block on. Allow reactor to clean up.
self.run()
- self.conn = None
+ if self.conn:
+ self.conn.handler = None # break cyclical reference
+ self.conn = None
self.container.global_handler = None # break circular ref: container to cadapter.on_error
Review comment:
This is probably no longer necessary (according to the comment) as we aren't using cadapter.on_error any more.
--
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