Skip to content

Commit

Permalink
tv.tv_usec = (_timeout % 1000) * 1000; align with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 committed May 7, 2023
1 parent a4889ba commit 95bffce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/WiFi/src/WiFiClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ int WiFiClient::connect(IPAddress ip, uint16_t port, int32_t timeout_ms)
FD_ZERO(&fdset);
FD_SET(sockfd, &fdset);
tv.tv_sec = _timeout / 1000;
tv.tv_usec = 0;
tv.tv_usec = (_timeout % 1000) * 1000;

#ifdef ESP_IDF_VERSION_MAJOR
int res = lwip_connect(sockfd, (struct sockaddr*)&serveraddr, sizeof(serveraddr));
Expand Down

0 comments on commit 95bffce

Please sign in to comment.