Skip to content

Commit

Permalink
Return 0 instead of -1 if write fails
Browse files Browse the repository at this point in the history
  • Loading branch information
giulcioffi authored and aentinger committed Jan 28, 2021
1 parent 27ecd66 commit b5d9a38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arduino/libraries/WiFi/src/WiFiClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ size_t WiFiClient::write(const uint8_t *buf, size_t size)

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

if (result < 0) {
return 0;
}

return result;

}
Expand Down

0 comments on commit b5d9a38

Please sign in to comment.