diff --git a/pwnagotchi/bettercap.py b/pwnagotchi/bettercap.py index bd7b7c50..0e23295b 100644 --- a/pwnagotchi/bettercap.py +++ b/pwnagotchi/bettercap.py @@ -39,23 +39,6 @@ class Client(object): async def start_websocket(self, consumer): s = "%s/events" % self.websocket - # while True: - # try: - # async with websockets.connect(s, ping_interval=60, ping_timeout=90) as ws: - # async for msg in ws: - # try: - # await consumer(msg) - # except Exception as ex: - # logging.debug("Error while parsing event (%s)", ex) - # except websockets.exceptions.ConnectionClosedError: - # logging.debug("Lost websocket connection. Reconnecting...") - # except websockets.exceptions.WebSocketException as wex: - # logging.debug("Websocket exception (%s)", wex) - # except OSError as e: - # logging.debug("Websocket OSError exception (%s) with parameter %s", e, s) - # except Exception as e: - # logging.debug("Other exception (%s) with parameter %s", e, s) - async with websockets.connect(s, ping_interval=60, ping_timeout=90) as ws: # After the websocket connection is opened, loop waiting for messages # Moved the websocket connection before the loop to avoid runaway websocket