diff --git a/WiFi/WiFiClient.cpp b/WiFi/WiFiClient.cpp index c6a416919..470a42938 100755 --- a/WiFi/WiFiClient.cpp +++ b/WiFi/WiFiClient.cpp @@ -44,11 +44,8 @@ int WiFiClient::connect(IPAddress ip, uint16_t port) { if (!connected()) { - Serial.println("timeout on client connection"); return 0; } - else - Serial.println("CONNECTED"); }else{ Serial.println("No Socket available"); return 0; @@ -134,7 +131,6 @@ void WiFiClient::stop() { // wait a second for the connection to close while (status() != CLOSED && millis() - start < 1000) delay(1); - Serial.print("Stop client! Status:");Serial.println(status(),10); _sock = 255; } @@ -144,12 +140,7 @@ uint8_t WiFiClient::connected() { return 0; } else { uint8_t s = status(); -/* - if (s== SYN_SENT) Serial.print("*"); - else{ - Serial.print("Status:"); Serial.println(s,10); - } -*/ + return !(s == LISTEN || s == CLOSED || s == FIN_WAIT_1 || s == FIN_WAIT_2 || s == TIME_WAIT || s == SYN_SENT || s== SYN_RCVD ||