SmartArduino / WiFiMCU

WiFiCMU-v0.9.8-pre release
https://github.com/SmartArduino/WiFiMCU
123 stars 65 forks source link

MQTT.C 's three bug #16

Open snoopyzz opened 8 years ago

snoopyzz commented 8 years ago
  1. when disconnect and reconnect, the free memory will less about 1KB. fix method:behind "pmqtt[i]->network.disconnect(&(pmqtt[i]->network));" need "MQTTClientDeinit(&(pmqtt[i]->client));"
  2. if cannot connect to the server, mqtt.close(mqttClt) cannot complete. fix method: before the disconnect action, must check close first. and I suggest goto exit when all the mqtt closed, to release the thread memory.
  3. when lmqtt_new, there 's a hardfault on some times. fix method: "pmqtt[k]->ssl_settings.ssl_enable = false;" cannot be commented, because the pmqtt's memory is from malloc, and not clear zero, if the ssl_enable is not 0 or 1, for example 2, will cause the hardfault.
neerajnagi commented 7 years ago

snoopyzz: having exact issue as in 3) . could you provide a workaround for this