File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -6482,13 +6482,6 @@ def test_dualstack_ipv6_family(self):
64826482class CreateServerFunctionalTest (unittest .TestCase ):
64836483 timeout = support .LOOPBACK_TIMEOUT
64846484
6485- def setUp (self ):
6486- self .thread = None
6487-
6488- def tearDown (self ):
6489- if self .thread is not None :
6490- self .thread .join (self .timeout )
6491-
64926485 def echo_server (self , sock ):
64936486 def run (sock ):
64946487 with sock :
@@ -6502,8 +6495,9 @@ def run(sock):
65026495
65036496 event = threading .Event ()
65046497 sock .settimeout (self .timeout )
6505- self .thread = threading .Thread (target = run , args = (sock , ))
6506- self .thread .start ()
6498+ thread = threading .Thread (target = run , args = (sock , ))
6499+ thread .start ()
6500+ self .addCleanup (thread .join , self .timeout )
65076501 event .set ()
65086502
65096503 def echo_client (self , addr , family ):
You can’t perform that action at this time.
0 commit comments