I am testing with a slightly modified version of the WifiWebServer example to receive data.
After a while sending data it crashes, the last line beeing:
Fatal exception (9):
i added this to WifiServer.h:
bool isAvailable() { return _unclaimed != 0; };
this is my loop():
while (server.isAvailable()) {
WiFiClient client = server.available();
if (!client) {
return;
}
// Wait until the client sends some data
Serial.println("new client");
while(!client.available()){
delay(1);
}
// Read the first line of the request
String req = client.readStringUntil(10);
Serial.println(req);
client.flush();
}
what is exception (9)?
what can i do to improve this?
might it be that an unclaimed client is already used while it is added to the _unclaimed list?
(looking at WifiServer.cpp line 132 and 84)