MCPcopy Create free account
hub / github.com/ElementsProject/elements / close

Method close

test/functional/test_framework/p2p.py:591–598  ·  view source on GitHub ↗

Close the connections and network event loop.

(self, timeout=10)

Source from the content-addressed store, hash-verified

589 self.network_event_loop.run_forever()
590
591 def close(self, timeout=10):
592 """Close the connections and network event loop."""
593 self.network_event_loop.call_soon_threadsafe(self.network_event_loop.stop)
594 wait_until_helper(lambda: not self.network_event_loop.is_running(), timeout=timeout)
595 self.network_event_loop.close()
596 self.join(timeout)
597 # Safe to remove event loop.
598 NetworkThread.network_event_loop = None
599
600 @classmethod
601 def listen(cls, p2p, callback, port=None, addr=None, idx=1):

Callers 11

get_node_outputMethod · 0.45
call_with_authFunction · 0.45
rpccallFunction · 0.45
run_testMethod · 0.45
run_testMethod · 0.45
get_nextMethod · 0.45
_requestMethod · 0.45
handleMethod · 0.45
stopMethod · 0.45
shutdownMethod · 0.45
stop_nodeMethod · 0.45

Calls 2

wait_until_helperFunction · 0.90
joinMethod · 0.45

Tested by 3

get_nextMethod · 0.36
shutdownMethod · 0.36
stop_nodeMethod · 0.36