Skip to content

Commit

Permalink
WiFiServer: fix error when calling close more than once
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed Jun 8, 2016
1 parent 533a600 commit 7fd7ca6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/ESP8266WiFi/src/WiFiServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ WiFiServer::WiFiServer(uint16_t port)
}

void WiFiServer::begin() {
close();
err_t err;
tcp_pcb* pcb = tcp_new();
if (!pcb)
Expand Down Expand Up @@ -118,6 +119,7 @@ void WiFiServer::close() {
return;
}
tcp_close(_pcb);
_pcb = nullptr;
}

void WiFiServer::stop() {
Expand Down

0 comments on commit 7fd7ca6

Please sign in to comment.