Skip to content

Commit a502fd2

Browse files
committed
Ethernet.tick() - polling for active connection was too frequent
in UIP_CLIENT_TIMER mode (it is default) an active connection was polled every tick()
1 parent f314c2e commit a502fd2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Ethernet.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,10 @@ UIPEthernetClass::tick()
256256
else
257257
{
258258
if (uip_conn->appstate != NULL && (long)( now - ((uip_userdata_t*)uip_conn->appstate)->timer) >= 0)
259+
{
259260
uip_process(UIP_POLL_REQUEST);
261+
((uip_userdata_t*)uip_conn->appstate)->timer = millis() + UIP_CLIENT_TIMER;
262+
}
260263
else
261264
continue;
262265
}

0 commit comments

Comments
 (0)