Skip to content

Commit

Permalink
Merge pull request #62 from giulcioffi/Issue61_lwip_disconn
Browse files Browse the repository at this point in the history
Do not immediately close connection after 1 failed write
  • Loading branch information
aentinger authored Jan 29, 2021
2 parents 00a6c79 + a44bbbb commit 4430423
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions arduino/libraries/WiFi/src/WiFiClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,14 @@ size_t WiFiClient::write(const uint8_t *buf, size_t size)
return 0;
}

int result = lwip_send_r(_socket, (void*)buf, size, MSG_DONTWAIT);
int result = lwip_send_r(_socket, (void*)buf, size, MSG_PEEK);

if (result < 0) {
lwip_close_r(_socket);
_socket = -1;
return 0;
}

return result;

}

int WiFiClient::available()
Expand Down
2 changes: 1 addition & 1 deletion main/CommandHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#include "esp_log.h"

const char FIRMWARE_VERSION[6] = "1.4.2";
const char FIRMWARE_VERSION[6] = "1.4.3";

/*IPAddress*/uint32_t resolvedHostname;

Expand Down

0 comments on commit 4430423

Please sign in to comment.