Skip to content

Commit

Permalink
check ClientContext's this and _pcb once out of the ::connect() delay (
Browse files Browse the repository at this point in the history
  • Loading branch information
d-a-v authored and devyte committed Jan 19, 2018
1 parent d5c43f0 commit dd00db1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/ESP8266WiFi/src/include/ClientContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ class ClientContext
_op_start_time = millis();
// This delay will be interrupted by esp_schedule in the connect callback
delay(_timeout_ms);
// WiFi may have vanished during the delay (#4078)
if (!this || !_pcb) {
DEBUGV(":vnsh\r\n");
return 0;
}
_connect_pending = 0;
if (state() != ESTABLISHED) {
abort();
Expand Down

0 comments on commit dd00db1

Please sign in to comment.