Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
d3fe213f
Commit
d3fe213f
authored
Mar 16, 2016
by
philip
Browse files
Fix bug with PINGREQ not being sent on a timeout.
Remove the offending code
parent
09f9bc62
Changes
1
Show whitespace changes
Inline
Side-by-side
app/modules/mqtt.c
View file @
d3fe213f
...
@@ -223,7 +223,7 @@ static sint8 mqtt_send_if_possible(struct espconn *pesp_conn)
...
@@ -223,7 +223,7 @@ static sint8 mqtt_send_if_possible(struct espconn *pesp_conn)
mud
->
keep_alive_tick
=
0
;
mud
->
keep_alive_tick
=
0
;
}
}
}
}
NODE_DBG
(
"
receive
, queue size: %d
\n
"
,
msg_size
(
&
(
mud
->
mqtt_state
.
pending_msg_q
)));
NODE_DBG
(
"
send_if_poss
, queue size: %d
\n
"
,
msg_size
(
&
(
mud
->
mqtt_state
.
pending_msg_q
)));
return
espconn_status
;
return
espconn_status
;
}
}
...
@@ -559,7 +559,6 @@ void mqtt_socket_timer(void *arg)
...
@@ -559,7 +559,6 @@ void mqtt_socket_timer(void *arg)
// no queued event.
// no queued event.
mud
->
keep_alive_tick
++
;
mud
->
keep_alive_tick
++
;
if
(
mud
->
keep_alive_tick
>
mud
->
mqtt_state
.
connect_info
->
keepalive
){
if
(
mud
->
keep_alive_tick
>
mud
->
mqtt_state
.
connect_info
->
keepalive
){
mud
->
event_timeout
=
MQTT_SEND_TIMEOUT
;
uint8_t
temp_buffer
[
MQTT_BUF_SIZE
];
uint8_t
temp_buffer
[
MQTT_BUF_SIZE
];
mqtt_msg_init
(
&
mud
->
mqtt_state
.
mqtt_connection
,
temp_buffer
,
MQTT_BUF_SIZE
);
mqtt_msg_init
(
&
mud
->
mqtt_state
.
mqtt_connection
,
temp_buffer
,
MQTT_BUF_SIZE
);
NODE_DBG
(
"
\r\n
MQTT: Send keepalive packet
\r\n
"
);
NODE_DBG
(
"
\r\n
MQTT: Send keepalive packet
\r\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