From 40aadc93cc255710cf76afa4a5d0c78b01876241 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 5 Jan 2024 22:04:31 +0100 Subject: [PATCH] Update bettercap.py --- pwnagotchi/bettercap.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/bettercap.py b/pwnagotchi/bettercap.py index 64eb35b1..961834e3 100644 --- a/pwnagotchi/bettercap.py +++ b/pwnagotchi/bettercap.py @@ -100,8 +100,11 @@ class Client(object): await asyncio.sleep(sleep_time) continue except OSError: - logging.warning('[bettercap] connection to the bettercap endpoint failed...') - pwnagotchi.reboot() + sleep_time = min_sleep + max_sleep * random.random() + logging.warning('connection to the bettercap endpoint failed...') + logging.warning('retrying connection in {} sec'.format(sleep_time)) + await asyncio.sleep(sleep_time) + continue def run(self, command, verbose_errors=True): while True: