tuanpmt / esp_mqtt

MQTT client library for ESP8266
http://tuanpm.net/post/esp_mqtt/
MIT License
1.15k stars 401 forks source link

re-queue on error sending #162

Open st0ff3r opened 5 years ago

st0ff3r commented 5 years ago

https://github.com/tuanpmt/esp_mqtt/blob/37cab7cd8a42d51dc9ca448a6eef447ce8ce5b3e/mqtt/mqtt.c#L757

should be replaced with if (espconn_send(client->pCon, dataBuffer, dataLen) != 0) { // error sending, put it back into the queue again if (QUEUE_Puts(&client->msgQueue, dataBuffer, dataLen) == -1) { INFO("MQTT: Queue full\r\n"); } }

and same in line 751