Kurppa Heikki
/
McLab20_esp8266_wifi_mqtt_hk
McLab20_esp8266_wifi_mqtt
Diff: main.cpp
- Revision:
- 3:3e3a9fd1a242
- Parent:
- 2:6d5dbdb22631
--- a/main.cpp Tue Sep 29 08:08:02 2020 +0000 +++ b/main.cpp Tue Sep 29 08:14:09 2020 +0000 @@ -60,6 +60,9 @@ while(1) { client.publish(MBED_CONF_APP_MQTT_TOPIC, msg); + + // Sleep time must be less than TCP timeout + // TODO: check if socket is usable before publishing ThisThread::sleep_for(30000); } //client.yield(100);