WifiServer - receiving data exception (9)
Posted: Sun Apr 19, 2015 6:44 am
Hello.
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:
i added this to WifiServer.h:
this is my loop():
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)
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:
Code: Select all
Fatal exception (9):
i added this to WifiServer.h:
Code: Select all
bool isAvailable() { return _unclaimed != 0; };
this is my loop():
Code: Select all
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)