Skip to content

Commit fdec9ee

Browse files
Fix the write function to return the actual number of bytes sent.
1 parent 39103da commit fdec9ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EthernetClient.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ size_t EthernetClient::write(uint8_t b)
8383
size_t EthernetClient::write(const uint8_t *buf, size_t size)
8484
{
8585
if (_sockindex >= MAX_SOCK_NUM) return 0;
86-
if (Ethernet.socketSend(_sockindex, buf, size)) return size;
86+
if (size=Ethernet.socketSend(_sockindex, buf, size)) return size;
8787
setWriteError();
8888
return 0;
8989
}

0 commit comments

Comments
 (0)