Ejemplo n.º 1
0
 def handle_close(self, reason=None):
     self.set_state("close")
     if reason is None:
         try:
             logger.debug("%s:%i: closing", self.destination.host,
                          self.destination.port)
         except AttributeError:
             logger.debug("Disconnected socket closing")
     else:
         logger.debug("%s:%i: closing, %s", self.destination.host,
                      self.destination.port, reason)
     AdvancedDispatcher.handle_close(self)
Ejemplo n.º 2
0
 def handle_close(self):
     self.set_state("close")
     if not (self.accepting or self.connecting or self.connected):
         # already disconnected
         return
     try:
         logger.debug("%s:%i: closing, %s", self.destination.host, self.destination.port, self.close_reason)
     except AttributeError:
         try:
             logger.debug("%s:%i: closing", self.destination.host, self.destination.port)
         except AttributeError:
             logger.debug("Disconnected socket closing")
     AdvancedDispatcher.handle_close(self)
Ejemplo n.º 3
0
 def handle_close(self):
     self.set_state("close")
     if not (self.accepting or self.connecting or self.connected):
         # already disconnected
         return
     try:
         logger.debug("%s:%i: closing, %s", self.destination.host, self.destination.port, self.close_reason)
     except AttributeError:
         try:
             logger.debug("%s:%i: closing", self.destination.host, self.destination.port)
         except AttributeError:
             logger.debug("Disconnected socket closing")
     AdvancedDispatcher.handle_close(self)
Ejemplo n.º 4
0
 def handle_close(self):
     """Handle close"""
     self.set_state("close")
     if not (self.accepting or self.connecting or self.connected):
         # already disconnected
         return
     try:
         logger.debug('%s:%i: closing, %s', self.destination.host,
                      self.destination.port, self.close_reason)
     except AttributeError:
         try:
             logger.debug('%(host)s:%(port)i: closing',
                          self.destination._asdict())
         except AttributeError:
             logger.debug('Disconnected socket closing')
     AdvancedDispatcher.handle_close(self)