Skip to content

Commit

Permalink
Tell 1st HOTSPOT state to CONNECT early, only once
Browse files Browse the repository at this point in the history
The way it worked before, timeout was always being called every
5 seconds, if the first HOTSPOT attempt worked, but CONNECT didn't.
  • Loading branch information
davesteele committed Mar 23, 2019
1 parent 0672673 commit 5c9aefa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion comitup/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ def init_states(hosts, callbacks, hotspot_pw):
hotspot_name = dns_to_conn(hosts[0])
assure_hotspot(hotspot_name, modemgr.get_ap_device())

set_state('HOTSPOT', timeout=5)
# Set an early kick to set CONNECTING mode
set_state('HOTSPOT')
timeout_add(5*1000, hotspot_timeout, state_id)


def add_state_callback(callback):
Expand Down

0 comments on commit 5c9aefa

Please sign in to comment.