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

Method _attempt_shutdown

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

Source from the content-addressed store, hash-verified

336 self._rest_port = self._caves_addr[1]
337
338 def _attempt_shutdown(self):
339 try:
340 self._listen.shutdown(socket.SHUT_RDWR)
341 except OSError:
342 pass
343 finally:
344 self._listen.close()
345
346 try:
347 self._caves_sock.shutdown(socket.SHUT_RDWR)
348 except OSError:
349 pass
350 finally:
351 self._caves_sock.close()
352
353 try:
354 self._output_log.close()
355 self._po.terminate()
356 self._po.kill()
357 self._po.communicate()
358 except OSError:
359 pass
360
361 def start(self):
362 self._invoke()

Callers 1

shutdownMethod · 0.95

Calls 2

shutdownMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected