Ensure Debugpy closes connection after a disconnect response (#1859)

* Ensure Debugpy closes connection after a disconnect response

* Moved disconnect fix from messaging to Client.disconnect_request
This commit is contained in:
Matej Aleksandrov 2025-03-07 20:14:32 +01:00 committed by GitHub
parent 96de4376a5
commit f054965148
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -700,6 +700,12 @@ class Client(components.Component):
except Exception:
log.swallow_exception()
# Close the client channel since we disconnected from the client.
try:
self.channel.close()
except Exception:
log.swallow_exception(level="warning")
def disconnect(self):
super().disconnect()