mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Handled specific exception generated when detaching from the debug session in VS Code using the debug 'disconnect' button. Prevents the ptvsd from becoming unresponsive (#823)
This commit is contained in:
parent
d3d334593b
commit
c3217df886
1 changed files with 9 additions and 0 deletions
|
|
@ -890,6 +890,15 @@ class VSCodeMessageProcessorBase(ipcjson.SocketIO, ipcjson.IpcChannel):
|
|||
_util.lock_release(self._listening)
|
||||
_util.lock_release(self._connected)
|
||||
self.close()
|
||||
except socket.error as exc:
|
||||
if exc.errno == errno.ECONNRESET:
|
||||
debug('client socket forcibly closed')
|
||||
with self._connlock:
|
||||
_util.lock_release(self._listening)
|
||||
_util.lock_release(self._connected)
|
||||
self.close()
|
||||
else:
|
||||
raise exc
|
||||
self.server_thread = _util.new_hidden_thread(
|
||||
target=process_messages,
|
||||
name=threadname,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue