Message372939
I noticed this test was still emitting a "ResourceWarning":
----------------------------------------------------------------------
$ ./python -m test test_ssl -m TestPostHandshakeAuth
0:00:00 load avg: 0.74 Run tests sequentially
0:00:00 load avg: 0.74 [1/1] test_ssl
/home/mjh/src/cpython/Lib/test/support/threading_helper.py:209: ResourceWarning: unclosed <ssl.SSLSocket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 33451), raddr=('127.0.0.1', 34038)>
del self.thread
ResourceWarning: Enable tracemalloc to get the object allocation traceback
== Tests result: SUCCESS ==
1 test OK.
Total duration: 1.1 sec
Tests result: SUCCESS
----------------------------------------------------------------------
and thought I would try silencing it by ensuring the SSL connection handled by the separate thread was closed before exiting. My attempt involved checking the thread's exception and acting accordingly, but I ran into a race condition which (solely as a proof of concept) I resolved by adding a sleep() call (see patch).
While I continue to search for a proper resolution I was wondering what approach someone with more insight might suggest. |
|
Date |
User |
Action |
Args |
2020-07-03 16:10:46 | mhughes | set | recipients:
+ mhughes, vstinner, miss-islington |
2020-07-03 16:10:46 | mhughes | set | messageid: <1593792646.11.0.477701847411.issue37322@roundup.psfhosted.org> |
2020-07-03 16:10:46 | mhughes | link | issue37322 messages |
2020-07-03 16:10:45 | mhughes | create | |
|