MCPcopy Create free account
hub / github.com/couchbase/couchbase-python-client / _attempt_shutdown

Method _attempt_shutdown

tests/mock_server.py:225–245  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

223 self._rest_port = int(sbuf)
224
225 def _attempt_shutdown(self):
226 try:
227 self._listen.shutdown(socket.SHUT_RDWR)
228 except OSError:
229 pass
230 finally:
231 self._listen.close()
232
233 try:
234 self._harakiri_sock.shutdown(socket.SHUT_RDWR)
235 except OSError:
236 pass
237 finally:
238 self._harakiri_sock.close()
239
240 try:
241 self._po.terminate()
242 self._po.kill()
243 self._po.communicate()
244 except OSError:
245 pass
246
247 def start(self):
248 self._invoke()

Callers 1

shutdownMethod · 0.95

Calls 2

shutdownMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected