MCPcopy Create free account
hub / github.com/USArmyResearchLab/Dshell / _close_connection

Method _close_connection

dshell/core.py:641–653  ·  view source on GitHub ↗

Runs through some standard actions to close a connection

(self, conn, full=False)

Source from the content-addressed store, hash-verified

639 self._timeout_connections(packet.dt)
640
641 def _close_connection(self, conn, full=False):
642 """
643 Runs through some standard actions to close a connection
644 """
645 # Add connection to queue ready to be processed, based on order they were received on the wire.
646 heapq.heappush(self._connection_queue, (conn.packets[0].frame, full, conn))
647
648 # Remove connection from tracker once in the queue.
649 try:
650 connkey = tuple(sorted(conn.addr) + [conn.protocol_num])
651 del self._connection_tracker[connkey]
652 except KeyError:
653 pass
654
655 def _handle_connection(self, conn: "Connection", full=False) -> bool:
656 """

Callers 3

_connection_handlerMethod · 0.95
_timeout_connectionsMethod · 0.95
_cleanup_connectionsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected