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
660648b7
Commit
660648b7
authored
Nov 06, 2015
by
Johny Mattsson
Browse files
Merge pull request #734 from karrots/mqtt-keep-alive
Fix mqtt connection closing when not publishing (fixes #359)
parents
5d28de85
c39d317b
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/mqtt.c
View file @
660648b7
...
...
@@ -66,7 +66,7 @@ typedef struct lmqtt_userdata
int
cb_puback_ref
;
mqtt_state_t
mqtt_state
;
mqtt_connect_info_t
connect_info
;
uint
32
_t
keep_alive_tick
;
uint
16
_t
keep_alive_tick
;
uint32_t
event_timeout
;
#ifdef CLIENT_SSL_ENABLE
uint8_t
secure
;
...
...
@@ -406,7 +406,6 @@ READPACKET:
espconn_sent
(
pesp_conn
,
node
->
msg
.
data
,
node
->
msg
.
length
);
}
}
mud
->
keep_alive_tick
=
0
;
NODE_DBG
(
"receive, queue size: %d
\n
"
,
msg_size
(
&
(
mud
->
mqtt_state
.
pending_msg_q
)));
NODE_DBG
(
"leave mqtt_socket_received.
\n
"
);
return
;
...
...
@@ -584,6 +583,7 @@ void mqtt_socket_timer(void *arg)
}
}
}
NODE_DBG
(
"keep_alive_tick: %d
\n
"
,
mud
->
keep_alive_tick
);
NODE_DBG
(
"leave mqtt_socket_timer.
\n
"
);
}
...
...
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