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
30ff0a16
Commit
30ff0a16
authored
Feb 19, 2019
by
Nathaniel Wesley Filardo
Committed by
Marcel Stör
Feb 19, 2019
Browse files
Raise MQTT_CONNECT_TIMEOUT (#2674)
Should fix
https://github.com/nodemcu/nodemcu-firmware/issues/2576
parent
6b570e8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/mqtt.c
View file @
30ff0a16
...
@@ -22,8 +22,16 @@
...
@@ -22,8 +22,16 @@
#define MQTT_MAX_CLIENT_LEN 64
#define MQTT_MAX_CLIENT_LEN 64
#define MQTT_MAX_USER_LEN 64
#define MQTT_MAX_USER_LEN 64
#define MQTT_MAX_PASS_LEN 64
#define MQTT_MAX_PASS_LEN 64
#define MQTT_SEND_TIMEOUT 5
#define MQTT_SEND_TIMEOUT 5
#define MQTT_CONNECT_TIMEOUT 5
/*
* This timeout needs to be long enough for a typical TCP connect()
* *and* the TLS handshake, if any. Most network stacks seem to wait
* tens of seconds for connect(), and TLS can take a good deal of time
* and several round trips. Because this matters only rarely, it may
* as well be set pretty high.
*/
#define MQTT_CONNECT_TIMEOUT 60
typedef
enum
{
typedef
enum
{
MQTT_INIT
,
MQTT_INIT
,
...
...
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