From 3fa8839626fcae215e8de250f1d108e922387610 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Tue, 12 Sep 2023 00:24:14 +0200 Subject: [PATCH] Version 2.3.8 Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/bettercap.py | 17 ----------------- 1 file changed, 17 deletions(-) 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