Improve example.

pull/181/merge
Roger A. Light 10 years ago
parent dfeb2f9ba6
commit 030a21786d

@ -8,13 +8,7 @@ int main(int argc, char *argv[])
mosqpp::lib_init(); mosqpp::lib_init();
tempconv = new mqtt_tempconv("tempconv", "localhost", 1883); tempconv = new mqtt_tempconv("tempconv", "localhost", 1883);
tempconv->loop_forever();
while(1){
rc = tempconv->loop();
if(rc){
tempconv->reconnect();
}
}
mosqpp::lib_cleanup(); mosqpp::lib_cleanup();

Loading…
Cancel
Save