diff options
author | Glenn Moloney <glenn.moloney@gmail.com> | 2018-06-04 20:17:47 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-06-08 13:13:21 +1000 |
commit | 039f196c56b97d879b7ce731cd479395dd479c3d (patch) | |
tree | 9f920c67fedeb4b01d3f18878185ebfbf8f4f7d9 /tests/float/python36.py | |
parent | a12d046c42dc7e786563f8247ed8aa8ac6e14a47 (diff) |
esp32/modnetwork: Fix isconnected() when using static IP config.
Currently <WLAN>.isconnected() always returns True if a static IP is set,
regardless of the state of the connection.
This patch introduces a new flag 'wifi_sta_connected' which is set in
event_handler() when GOT_IP event is received and reset when DISCONNECTED
event is received (unless re-connect is successful). isconnected() now
simply returns the status of this flag (for STA_IF).
The pre-existing flag misleadingly named 'wifi_sta_connected" is also
renamed to 'wifi_sta_connect_requested'.
Fixes issue #3837
Diffstat (limited to 'tests/float/python36.py')
0 files changed, 0 insertions, 0 deletions