nodemcu-firmware/app/modules
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
..
enduser_setup HTML for Apple devices to mitigate POST fragmentation (#3069) 2020-06-09 22:26:52 +02:00
.gitignore Adds support for verifying the certificate offered by an SSL server. 2016-03-09 21:51:23 -05:00
Makefile Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
adc.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
ads1115.c ads1115 minor cleanup 2020-06-17 23:50:31 +01:00
adxl345.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
am2320.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
apa102.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
bit.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
bloom.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
bme280.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
bme680.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
bme680_defs.h Update sensor driver for BME680 to 3.5.9 (#2969) 2020-06-09 22:26:06 +02:00
bmp085.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
coap.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
color_utils.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
color_utils.h Major cleanup - c_whatever is finally history. (#2838) 2019-07-22 00:58:21 +03:00
cron.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
crypto.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
dcc.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
dht.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
encoder.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
enduser_setup.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
file.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
gdbstub.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
gpio.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
gpio_pulse.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
hdc1080.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
hmc5883l.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
http.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
hx711.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
i2c.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
l3g4200d.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
mcp4725.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
mdns.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
mqtt.c Fixed an regression that MQTT client timer is disarmed prematurely when 2020-06-30 13:20:17 +01:00
net.c net_info module - ping function (#2854) 2020-06-09 22:26:52 +02:00
net_ping.c net_info module - ping function (#2854) 2020-06-09 22:26:52 +02:00
net_ping.h net_info module - ping function (#2854) 2020-06-09 22:26:52 +02:00
node.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
ow.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
pcm.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
perf.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
pipe.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
pwm.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
pwm2.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
rfswitch.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
rotary.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
rtcfifo.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
rtcmem.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
rtctime.c rtctime: try harder to speak in integers (#3161) 2020-06-20 22:06:32 +02:00
si7021.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
sigma_delta.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
sjson.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
sntp.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
softuart.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
somfy.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
spi.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
struct.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
switec.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
tcs34725.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
tls.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
tm1829.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
tmr.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
tsl2561.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
u8g2.c u8g2: Fix name of updateDisplay export (#3093) 2020-06-09 22:26:52 +02:00
uart.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
ucg.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
websocket.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
wifi.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
wifi_common.c Major cleanup - c_whatever is finally history. (#2838) 2019-07-22 00:58:21 +03:00
wifi_common.h Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
wifi_eventmon.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
wifi_monitor.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
wps.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
ws2801.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
ws2812.c fix a memory leak in ws2812_buffer_shift by freeing the same amount of bytes we allocated before 2020-06-12 18:23:36 +01:00
ws2812.h Fixes for `ws2812` and `ws2812_effects` (#2953) 2020-06-09 22:26:06 +02:00
ws2812_effects.c ws2812_effects deprecation warning 2020-06-09 22:26:52 +02:00
xpt2046.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00