MCPcopy Create free account
hub / github.com/Bitmessage/PyBitmessage / handle_close

Method handle_close

src/network/bmproto.py:560–572  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

558 pass
559
560 def handle_close(self):
561 self.set_state("close")
562 if not (self.accepting or self.connecting or self.connected):
563 # already disconnected
564 return
565 try:
566 logger.debug("%s:%i: closing, %s", self.destination.host, self.destination.port, self.close_reason)
567 except AttributeError:
568 try:
569 logger.debug("%s:%i: closing", self.destination.host, self.destination.port)
570 except AttributeError:
571 logger.debug("Disconnected socket closing")
572 AdvancedDispatcher.handle_close(self)

Callers 4

loopMethod · 0.45
handle_readMethod · 0.45
handle_writeMethod · 0.45
tls_handshakeMethod · 0.45

Calls 1

set_stateMethod · 0.80

Tested by

no test coverage detected