File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6528,13 +6528,6 @@ def test_dualstack_ipv6_family(self):
65286528class CreateServerFunctionalTest (unittest .TestCase ):
65296529 timeout = support .LOOPBACK_TIMEOUT
65306530
6531- def setUp (self ):
6532- self .thread = None
6533-
6534- def tearDown (self ):
6535- if self .thread is not None :
6536- self .thread .join (self .timeout )
6537-
65386531 def echo_server (self , sock ):
65396532 def run (sock ):
65406533 with sock :
@@ -6548,8 +6541,9 @@ def run(sock):
65486541
65496542 event = threading .Event ()
65506543 sock .settimeout (self .timeout )
6551- self .thread = threading .Thread (target = run , args = (sock , ))
6552- self .thread .start ()
6544+ thread = threading .Thread (target = run , args = (sock , ))
6545+ thread .start ()
6546+ self .addCleanup (thread .join , self .timeout )
65536547 event .set ()
65546548
65556549 def echo_client (self , addr , family ):
You can’t perform that action at this time.
0 commit comments