Skip to content

Commit 9239152

Browse files
committed
LwipClient - op bool fix
op bool should return false only for a 'null' client. a closed client may still have data to read. a Client returned from Server.available() should not fail on usual bool test if it has data available.
1 parent a9fc7ea commit 9239152

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/lwIpWrapper/src/lwipClient.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ uint8_t lwipClient::status()
243243
lwipClient::operator bool()
244244
{
245245
/* -------------------------------------------------------------------------- */
246-
return (_tcp_client && (_tcp_client->state != TCP_CLOSING));
246+
return (_tcp_client && _tcp_client->pcb);
247247
}
248248

249249
/* -------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)