Skip to content

Commit f0336b3

Browse files
committed
fix change in IDF causing havoc when used as component
1 parent 46d1b17 commit f0336b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/WiFi/src/WiFiServer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ WiFiClient WiFiServer::available(){
4949
else {
5050
struct sockaddr_in _client;
5151
int cs = sizeof(struct sockaddr_in);
52-
client_sock = accept(sockfd, (struct sockaddr *)&_client, (socklen_t*)&cs);
52+
client_sock = lwip_accept_r(sockfd, (struct sockaddr *)&_client, (socklen_t*)&cs);
5353
}
5454
if(client_sock >= 0){
5555
int val = 1;
@@ -96,7 +96,7 @@ bool WiFiServer::hasClient() {
9696
}
9797
struct sockaddr_in _client;
9898
int cs = sizeof(struct sockaddr_in);
99-
_accepted_sockfd = accept(sockfd, (struct sockaddr *)&_client, (socklen_t*)&cs);
99+
_accepted_sockfd = lwip_accept_r(sockfd, (struct sockaddr *)&_client, (socklen_t*)&cs);
100100
if (_accepted_sockfd >= 0) {
101101
return true;
102102
}

0 commit comments

Comments
 (0)