Update WiFiUdp.cpp

Change return value of UDP::endPacket() to match specifications

Ref: https://github.com/espressif/arduino-esp32/issues/138
This commit is contained in:
Me No Dev 2017-01-19 02:03:37 +02:00 committed by GitHub
parent a2931e7a5b
commit be7871677f

View File

@ -158,8 +158,9 @@ int WiFiUDP::endPacket(){
int sent = sendto(udp_server, tx_buffer, tx_buffer_len, 0, (struct sockaddr*) &recipient, sizeof(recipient));
if(sent < 0){
log_e("could not send data: %d", errno);
return 0;
}
return sent;
return 1;
}
size_t WiFiUDP::write(uint8_t data){