Esempio n. 1
0
 def handle_close(self):
     """ Close the connection and clear buffer """
     self.data_buff = ''
     LOGGER.error('%s;Connection closed', self.hostname)
     self.close()
     # remove itself from aggregator
     self.aggregator.pop(self.hostname, None)
Esempio n. 2
0
 def handle_error(self):
     """ Connection failed """
     LOGGER.error('%s;%r', self.hostname, sys.exc_info())