def handle_close(self): asyncore.dispatcher_with_send.handle_close(self) print("[continuum] Connection lost, reconnecting.") self.core.create_client()