Closed
Description
Basic Infos
Hardware
Hardware: NodeMCUv2, ESP-12E
Core Version: ?
Description
The WifiClient connect function hang the program
Settings in IDE
Doesn't matter
Sketch
#include <Arduino.h>
void setup() {
}
void loop() {
WiFiClient client;
IPAddress ipAddr;
ipAddr.fromString(IPADDR);
Serial.println("Trying to log");
if (client.connect(ipAddr, PORT)) {
client.print(msg);
Serial.println("Logged");
}
// Have some other time critical stuff here. The connect takes too long if the ipaddress doesn't exist.
}