Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit fdcdd4d

Browse files
committed
better check for connection progress
1 parent 083f007 commit fdcdd4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SyncClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int SyncClient::connect(IPAddress ip, uint16_t port){
6868
#else
6969
if(_client->connect(ip, port)){
7070
#endif
71-
while(_client != NULL && !_client->connected() && !_client->disconnecting())
71+
while(_client != NULL && !_client->connected() && _client->connecting())
7272
delay(1);
7373
return connected();
7474
}
@@ -90,7 +90,7 @@ int SyncClient::connect(const char *host, uint16_t port){
9090
#else
9191
if(_client->connect(host, port)){
9292
#endif
93-
while(_client != NULL && !_client->connected() && !_client->disconnecting())
93+
while(_client != NULL && !_client->connected() && _client->connecting())
9494
delay(1);
9595
return connected();
9696
}

0 commit comments

Comments
 (0)