MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / shutdown

Method shutdown

bbot/core/engine.py:331–347  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

329 socket.close()
330
331 async def shutdown(self):
332 if not self._shutdown_status:
333 self._shutdown_status = True
334 self.log.verbose(f"{self.name}: shutting down...")
335 # send shutdown signal
336 await self.send_shutdown_message()
337 # then terminate context
338 try:
339 self.context.destroy(linger=0)
340 except Exception:
341 print(traceback.format_exc(), file=sys.stderr)
342 try:
343 self.context.term()
344 except Exception:
345 print(traceback.format_exc(), file=sys.stderr)
346 # delete socket file on exit
347 self.socket_path.unlink(missing_ok=True)
348
349
350class EngineServer(EngineBase):

Callers 4

proxy_serverFunction · 0.80
test_engineFunction · 0.80
_cancel_tasksMethod · 0.80
_cleanupMethod · 0.80

Calls 2

send_shutdown_messageMethod · 0.95
verboseMethod · 0.45

Tested by 2

proxy_serverFunction · 0.64
test_engineFunction · 0.64