File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ int arduino::WiFiUDP::parsePacket() {
8686 _current_packet = _packet_buffer;
8787 _current_packet_size = ret;
8888
89- return 1 ;
89+ return _current_packet_size ;
9090}
9191
9292int arduino::WiFiUDP::available () {
@@ -106,7 +106,7 @@ int arduino::WiFiUDP::read() {
106106 // check for overflow
107107 if (_current_packet > _packet_buffer + _current_packet_size) {
108108 // try reading the next packet...
109- if (parsePacket () == 1 ) {
109+ if (parsePacket () > 0 ) {
110110 // if so, read first byte of next packet;
111111 return read ();
112112 }
@@ -141,7 +141,7 @@ int arduino::WiFiUDP::read(unsigned char* buffer, size_t len) {
141141 // at the end of the packet?
142142 if (max_bytes == 0 ) {
143143 // try read next packet...
144- if (parsePacket () == 1 ) {
144+ if (parsePacket () > 0 ) {
145145 return read (buffer, len);
146146 }
147147 else {
You can’t perform that action at this time.
0 commit comments