Skip to content

Commit

Permalink
Merge pull request #20 from JAndrassy/server_available_fix
Browse files Browse the repository at this point in the history
AT server.available fix
  • Loading branch information
facchinm committed Sep 22, 2023
2 parents 65101b8 + c78078e commit ec62308
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions UNOR4USBBridge/cmds_wifi_netif.h
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,9 @@ void CAtHandler::add_cmds_wifi_netif() {
for(int i = 0;i<MAX_CLIENT_AVAILABLE;i++) {
if(!serverClients[i].client) {
serverClients[i].client = serverWiFi[sock]->available();
if(!serverClients[i].client)
break;
serverClients[i].server = sock;
break;
}
}

Expand All @@ -498,7 +499,9 @@ void CAtHandler::add_cmds_wifi_netif() {
int end = last_server_client_sock;

do {
if(serverClients[last_server_client_sock].client) {
if(serverClients[last_server_client_sock].client
&& serverClients[last_server_client_sock].server == sock
&& serverClients[last_server_client_sock].client.available() > 0) {
client_sock = last_server_client_sock;
break;
}
Expand Down

0 comments on commit ec62308

Please sign in to comment.