multiple edits

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-09-21 12:13:41 +02:00
parent 8b09c5c8f1
commit ddf64cb0b3
8 changed files with 61 additions and 27 deletions

View File

@ -70,7 +70,8 @@ class Client(object):
while True:
logging.info("[bettercap] creating new websocket...")
try:
async with websockets.connect(s, ping_interval=ping_interval, ping_timeout=ping_timeout, max_queue=max_queue) as ws:
async with websockets.connect(s, ping_interval=ping_interval, ping_timeout=ping_timeout,
max_queue=max_queue) as ws:
# listener loop
while True:
try:
@ -78,7 +79,7 @@ class Client(object):
try:
await consumer(msg)
except Exception as ex:
logging.debug("error while parsing event (%s)", ex)
logging.debug("error while parsing event (%s)", ex)
except websockets.ConnectionClosedError:
try:
pong = await ws.ping()