Closed mikedarcy closed 2 years ago
I've seen the following warnings when multiple clients are instantiated and destroyed relatively quickly (e.g. in a unit test that creates and removes handles from a live server):
ResourceWarning: unclosed <ssl.SSLSocket fd=1092, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('xxx.xxx.xxx.xxx', 65255), raddr=('xxx.xxx.xxx.xxx', 8000)>
These unclosed sockets can easily be cleaned up by calling session.close() on the requests session when the HandleSystemConnector object is deleted.
session.close()
requests
HandleSystemConnector
I've seen the following warnings when multiple clients are instantiated and destroyed relatively quickly (e.g. in a unit test that creates and removes handles from a live server):
These unclosed sockets can easily be cleaned up by calling
session.close()
on therequests
session when theHandleSystemConnector
object is deleted.