nodemcu-firmware/app
Datong Sun 95f5191cd3 Fixed an regression that MQTT client timer is disarmed prematurely when
connecting to server.

Inside af426d0315, the `mqtt_socket_timer`
function was modified so that instead of checking the presense of
allocated `mud->pesp_conn` structure, `mud->connected` field was used
on determining if the timer need to be disarmed.

However, this is not entirely correct. If the TCP socket is actively
connecting and haven't timed out yet, then `mud->connected` is also
`false` and the timer will think the connection is broken and
disarms itself. This has two consequences:

* The connection timeout counter is no longer decremented and checked
* After connection succeeds, keepalive heartbeat is no longer being
  sent (#3166). This is particularly noticeable in MQTT over TLS
  connections, because those usually takes longer than 1 second
  to finish and the timer would had chance to execute before connection
  is established

This commit checks the presense of `pesp_conn->proto.tcp` pointer
instead, which was allocated in the same place as the (old) `pesp_conn`
struct, and according to my test indeed fixes the above issue.
2020-06-30 13:20:17 +01:00
..
coap Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
crypto SSL rampage (#2938) 2020-06-09 22:26:06 +02:00
dht Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
driver Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
esp-gdbstub Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
fatfs Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
http Fix binary and chunked HTTP downloads (#2985) 2020-06-09 22:26:52 +02:00
include Remove deprecated rc module 2020-06-10 02:15:08 +01:00
libc Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
lua Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
lua53 Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
lwip Networking rampage and accumulated fixes (#3060) 2020-06-09 22:26:52 +02:00
mbedtls tls: fix new verification API 2020-06-09 22:26:52 +02:00
modules Fixed an regression that MQTT client timer is disarmed prematurely when 2020-06-30 13:20:17 +01:00
mqtt WIP: MQTT fixes (#2986) 2020-06-09 22:26:52 +02:00
net Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
pcm Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
platform Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
pm Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
sjson Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
smart Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
spiffs Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
tsl2561 Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
u8g2lib Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
ucglib Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
user Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
uzlib Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
websocket Networking rampage and accumulated fixes (#3060) 2020-06-09 22:26:52 +02:00
.gitignore seperate user_config.h to speed-up compile when modules disabled/enabled 2015-03-06 11:59:04 +08:00
Makefile Remove sqlite3 module 2020-06-10 02:14:29 +01:00