Skip to content

Commit be78716

Browse files
authored
Update WiFiUdp.cpp
Change return value of UDP::endPacket() to match specifications Ref: espressif#138
1 parent a2931e7 commit be78716

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/WiFi/src/WiFiUdp.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ int WiFiUDP::endPacket(){
158158
int sent = sendto(udp_server, tx_buffer, tx_buffer_len, 0, (struct sockaddr*) &recipient, sizeof(recipient));
159159
if(sent < 0){
160160
log_e("could not send data: %d", errno);
161+
return 0;
161162
}
162-
return sent;
163+
return 1;
163164
}
164165

165166
size_t WiFiUDP::write(uint8_t data){

0 commit comments

Comments
 (0)