Unverified Commit b9136859 authored by Johan Ström's avatar Johan Ström Committed by GitHub
Browse files

MQTT: trigger conn failure callback if DNS success but connection failed (#3477)

parent 1965a12e
......@@ -1021,7 +1021,12 @@ static void socket_dns_found(const char *name, ip_addr_t *ipaddr, void *arg)
NODE_DBG(IPSTR, IP2STR(&(ipaddr->addr)));
NODE_DBG("\n");
mqtt_socket_do_connect(mud);
if(mqtt_socket_do_connect(mud) != ESPCONN_OK) {
NODE_DBG("socket_dns_found, got DNS but connect failed\n");
mqtt_connack_fail(mud, MQTT_CONN_FAIL_DNS);
mqtt_socket_disconnected(arg);
return;
}
}
#include "pm/swtimer.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment