1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-19 13:54:23 +01:00

Fixing bug in Ethernet (recv() in socket.cpp). (Paul Stoffregen)

http://code.google.com/p/arduino/issues/detail?id=670
This commit is contained in:
David A. Mellis 2011-10-10 11:49:50 -04:00
parent b35e76ab42
commit 9296f1db31

View File

@ -151,7 +151,7 @@ uint16_t recv(SOCKET s, uint8_t *buf, uint16_t len)
{
// No data available.
uint8_t status = W5100.readSnSR(s);
if ( s == SnSR::LISTEN || s == SnSR::CLOSED || s == SnSR::CLOSE_WAIT )
if ( status == SnSR::LISTEN || status == SnSR::CLOSED || status == SnSR::CLOSE_WAIT )
{
// The remote end has closed its side of the connection, so this is the eof state
ret = 0;