Update bettercap.py

This commit is contained in:
Jeroen Oudshoorn
2024-01-05 22:04:31 +01:00
parent 88668fb4f8
commit 40aadc93cc

View File

@ -100,8 +100,11 @@ class Client(object):
await asyncio.sleep(sleep_time) await asyncio.sleep(sleep_time)
continue continue
except OSError: except OSError:
logging.warning('[bettercap] connection to the bettercap endpoint failed...') sleep_time = min_sleep + max_sleep * random.random()
pwnagotchi.reboot() 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): def run(self, command, verbose_errors=True):
while True: while True: