Skip to content

Commit

Permalink
Refreshes connection state when retrieving connection status
Browse files Browse the repository at this point in the history
Requires C++11
  • Loading branch information
Veijo Pesonen committed Oct 26, 2018
1 parent 93b9cc3 commit 1c3fe4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ESP8266Interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,9 @@ void ESP8266Interface::attach(mbed::Callback<void(nsapi_event_t, intptr_t)> stat

nsapi_connection_status_t ESP8266Interface::get_connection_status() const
{
if (_initialized) {
_esp.bg_process_oob(ESP8266_RECV_TIMEOUT, true);
}
return _conn_stat;
}

Expand Down
2 changes: 1 addition & 1 deletion ESP8266Interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class ESP8266Interface : public NetworkStack, public WiFiInterface

private:
// AT layer
ESP8266 _esp;
mutable ESP8266 _esp;
void update_conn_state_cb();

// Credentials
Expand Down

0 comments on commit 1c3fe4e

Please sign in to comment.