Skip to content

Commit 4430423

Browse files
authored
Merge pull request #62 from giulcioffi/Issue61_lwip_disconn
Do not immediately close connection after 1 failed write
2 parents 00a6c79 + a44bbbb commit 4430423

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

arduino/libraries/WiFi/src/WiFiClient.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,14 @@ size_t WiFiClient::write(const uint8_t *buf, size_t size)
8787
return 0;
8888
}
8989

90-
int result = lwip_send_r(_socket, (void*)buf, size, MSG_DONTWAIT);
90+
int result = lwip_send_r(_socket, (void*)buf, size, MSG_PEEK);
9191

9292
if (result < 0) {
93-
lwip_close_r(_socket);
94-
_socket = -1;
9593
return 0;
9694
}
9795

9896
return result;
97+
9998
}
10099

101100
int WiFiClient::available()

main/CommandHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#include "esp_log.h"
3838

39-
const char FIRMWARE_VERSION[6] = "1.4.2";
39+
const char FIRMWARE_VERSION[6] = "1.4.3";
4040

4141
/*IPAddress*/uint32_t resolvedHostname;
4242

0 commit comments

Comments
 (0)