In libraries/Ethernet/utility/socket.cpp, at line 154.
// No data available.
uint8_t status = W5100.readSnSR(s);
if ( s == SnSR::LISTEN || s == SnSR::CLOSED || s == SnSR::CLOSE_WAIT )
{
// The remote end has closed its side of the connection, so this is the eof state
ret = 0;
}
I'm guessing the intention was to actually test the socket's status byte? It
doesn't make much sense to compare status codes to the socket index (eg, 0 to
3)?
Maybe it was meant to be like this?
uint8_t status = W5100.readSnSR(s);
if ( status == SnSR::LISTEN || status == SnSR::CLOSED || status == SnSR::CLOSE_WAIT )
{ // ....
Hope this helps.
Original issue reported on code.google.com by paul.sto...@gmail.com on 5 Oct 2011 at 10:35
Original issue reported on code.google.com by
paul.sto...@gmail.com
on 5 Oct 2011 at 10:35