Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
b9136859
Unverified
Commit
b9136859
authored
Dec 06, 2021
by
Johan Ström
Committed by
GitHub
Dec 06, 2021
Browse files
MQTT: trigger conn failure callback if DNS success but connection failed (#3477)
parent
1965a12e
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/mqtt.c
View file @
b9136859
...
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment