Skip to content

Commit cb4e50f

Browse files
committed
Clear book keeping for client socket if no data available and disconnected
1 parent cec8633 commit cb4e50f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/GSMServer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ GSMClient GSMServer::available(bool synch)
155155
if (client.available()) {
156156
socket = _childSockets[i].socket;
157157
break;
158+
} else if (!client.connected()) {
159+
_childSockets[i].socket = -1;
160+
_childSockets[i].accepted = false;
158161
}
159162
}
160163
}

0 commit comments

Comments
 (0)