File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6492,13 +6492,6 @@ def test_dualstack_ipv6_family(self):
64926492class CreateServerFunctionalTest (unittest .TestCase ):
64936493 timeout = support .LOOPBACK_TIMEOUT
64946494
6495- def setUp (self ):
6496- self .thread = None
6497-
6498- def tearDown (self ):
6499- if self .thread is not None :
6500- self .thread .join (self .timeout )
6501-
65026495 def echo_server (self , sock ):
65036496 def run (sock ):
65046497 with sock :
@@ -6512,8 +6505,9 @@ def run(sock):
65126505
65136506 event = threading .Event ()
65146507 sock .settimeout (self .timeout )
6515- self .thread = threading .Thread (target = run , args = (sock , ))
6516- self .thread .start ()
6508+ thread = threading .Thread (target = run , args = (sock , ))
6509+ thread .start ()
6510+ self .addCleanup (thread .join , self .timeout )
65176511 event .set ()
65186512
65196513 def echo_client (self , addr , family ):
You can’t perform that action at this time.
0 commit comments