Skip to content

Commit

Permalink
Adjust for prev commit
Browse files Browse the repository at this point in the history
The initial connection logic should come first
  • Loading branch information
TMRh20 committed Oct 14, 2023
1 parent 844e849 commit a1c353a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions RF24Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,14 @@ void serialip_appcall(void)

#if UIP_CONNECTION_TIMEOUT > 0
if (u && u->connectTimeout > 0) {
if(!u->initialData){
u->connectTimer = millis();
u->initialData = true;
}else
if (millis() - u->connectTimer > u->connectTimeout){
u->state |= UIP_CLIENT_CLOSE;
u->connectTimer = millis();
IF_RF24ETHERNET_DEBUG_CLIENT(Serial.println(); Serial.print(millis()); Serial.println("UIP Client close(timeout)"););
}else{
if(!u->initialData){
u->connectTimer = millis();
u->initialData = true;
}
}
}
#endif
Expand Down

0 comments on commit a1c353a

Please sign in to comment.