Also returning WRONG_STATE if the server is already closed

This commit is contained in:
Rodrigo Alfonso
2024-12-08 03:32:26 -03:00
parent 2e290a1a1d
commit 22b413dd54

View File

@@ -447,7 +447,7 @@ class LinkWireless {
*/
bool closeServer() {
LINK_WIRELESS_RESET_IF_NEEDED
if (state != SERVING) {
if (state != SERVING || sessionState.serverClosed) {
lastError = WRONG_STATE;
return false;
}