test_asyncore: Optimize capture_server() (#93867)

Remove time.sleep(0.01) in test_asyncore capture_server(). The sleep
was redundant and inefficient, since the loop starts with
select.select() which also implements a sleep (poll for socket data
with a timeout).
This commit is contained in:
Victor Stinner 2022-06-15 18:28:31 +02:00 committed by GitHub
parent 41fccd23e9
commit 46e455f21c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,7 +87,6 @@ def capture_server(evt, buf, serv):
break
if n <= 0:
break
time.sleep(0.01)
conn.close()
finally: