mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-02-05 18:50:06 +08:00
Improve example.
This commit is contained in:
@@ -8,13 +8,7 @@ int main(int argc, char *argv[])
|
||||
mosqpp::lib_init();
|
||||
|
||||
tempconv = new mqtt_tempconv("tempconv", "localhost", 1883);
|
||||
|
||||
while(1){
|
||||
rc = tempconv->loop();
|
||||
if(rc){
|
||||
tempconv->reconnect();
|
||||
}
|
||||
}
|
||||
tempconv->loop_forever();
|
||||
|
||||
mosqpp::lib_cleanup();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user