MCPcopy Create free account
hub / github.com/microsoft/debugpy / close

Method close

tests/debug/comms.py:87–112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

85 return t
86
87 def close(self):
88 sock = self._socket
89 if sock:
90 self._socket = None
91 log.debug("Closing {0} client socket...", self)
92 try:
93 sock.shutdown(socket.SHUT_RDWR)
94 except Exception:
95 pass
96 try:
97 sock.close()
98 except Exception:
99 pass
100
101 server_socket = self._server_socket
102 if server_socket:
103 self._server_socket = None
104 log.debug("Closing {0} server socket...", self)
105 try:
106 server_socket.shutdown(socket.SHUT_RDWR)
107 except Exception:
108 pass
109 try:
110 server_socket.close()
111 except Exception:
112 pass
113
114
115class ScratchPad(object):

Callers 9

stopFunction · 0.45
mainFunction · 0.45
_workerMethod · 0.45
__exit__Method · 0.45
spawn_debuggeeMethod · 0.45
_process_responseMethod · 0.45
disconnectMethod · 0.45
closeFunction · 0.45
backchannel.pyFile · 0.45

Calls 1

shutdownMethod · 0.45

Tested by

no test coverage detected