mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Fix sporadic EBADF from accept()
This commit is contained in:
parent
fb9590fab0
commit
7454f89d25
1 changed files with 1 additions and 1 deletions
|
|
@ -78,7 +78,7 @@ def serve(name, handler, host, port=0, backlog=socket.SOMAXCONN, timeout=None):
|
|||
while True:
|
||||
try:
|
||||
sock, (other_host, other_port) = listener.accept()
|
||||
except OSError:
|
||||
except (OSError, socket.error):
|
||||
# Listener socket has been closed.
|
||||
break
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue