mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Swallow errno.ENOTCONN during socket shutdown.
This commit is contained in:
parent
247391cf8a
commit
90be0b4ef0
1 changed files with 6 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from collections import namedtuple
|
||||
import errno
|
||||
import socket
|
||||
|
||||
import ptvsd.wrapper as _ptvsd
|
||||
|
|
@ -87,7 +88,11 @@ class Connection(namedtuple('Connection', 'client server')):
|
|||
def shutdown(self, *args, **kwargs):
|
||||
if self.server is not None:
|
||||
self.server.shutdown(*args, **kwargs)
|
||||
self.client.shutdown(*args, **kwargs)
|
||||
try:
|
||||
self.client.shutdown(*args, **kwargs)
|
||||
except OSError as exc:
|
||||
if exc.errno != errno.ENOTCONN:
|
||||
raise
|
||||
|
||||
def close(self):
|
||||
if self.server is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue