From b539a761241a5d99b1a87003904f44bd586d4449 Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Sun, 13 Oct 2019 18:32:14 +0200 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- pwnagotchi/mesh/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/mesh/utils.py b/pwnagotchi/mesh/utils.py index fbe8271..6129e82 100644 --- a/pwnagotchi/mesh/utils.py +++ b/pwnagotchi/mesh/utils.py @@ -29,8 +29,6 @@ class AsyncAdvertiser(object): self._peers = {} self._closest_peer = None - _thread.start_new_thread(self._adv_poller, ()) - def _update_advertisement(self, s): self._advertisement['pwnd_run'] = len(self._handshakes) self._advertisement['pwnd_tot'] = utils.total_unique_handshakes(self._config['bettercap']['handshakes']) @@ -40,6 +38,8 @@ class AsyncAdvertiser(object): def start_advertising(self): if self._config['personality']['advertise']: + _thread.start_new_thread(self._adv_poller, ()) + grid.set_advertisement_data(self._advertisement) grid.advertise(True) self._view.on_state_change('face', self._on_face_change)