From 5080c3d5f58ca6d0c043a8ca2b30aeaa02be89f5 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 8 Sep 2023 20:26:13 +0200 Subject: [PATCH] Revert "Version 2.3.4" This reverts commit ed0b06b701c2fcaa8102c5f3863905746641116b. --- pwnagotchi/mesh/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/mesh/utils.py b/pwnagotchi/mesh/utils.py index c46bae5d..e97fa969 100644 --- a/pwnagotchi/mesh/utils.py +++ b/pwnagotchi/mesh/utils.py @@ -1,4 +1,5 @@ -import _thread +# import _thread +from concurrent.futures import ThreadPoolExecutor import logging import time @@ -41,7 +42,9 @@ class AsyncAdvertiser(object): def start_advertising(self): if self._config['personality']['advertise']: - _thread.start_new_thread(self._adv_poller, ()) + # _thread.start_new_thread(self._adv_poller, ()) + with ThreadPoolExecutor(max_workers=4) as executor: + executor.submit(self._adv_poller) grid.set_advertisement_data(self._advertisement) grid.advertise(True)