Reliability of Spark Core for WiFi and Client.Connection()

Hi @spaksiva

There is another thread with a fellow with similar problems here:

He switched his code to be more like this and it worked better but still had some problems:

  unsigned long startTime = millis();
  while (client.available() == false && millis() - startTime < 1000) {
    // Just wait up to 1000 millis
    }
  startTime = millis();
  while (client.available() > 0 && millis() - startTime < 1000) {
    client.read();
    }
  client.flush();
  client.stop();
1 Like