]> git.michaelhowe.org Git - packages/p/paho-mqtt.git/commitdiff
Use loop_forever() in example.
authorRoger Light <roger@atchoo.org>
Tue, 31 Dec 2013 22:37:18 +0000 (22:37 +0000)
committerRoger Light <roger@atchoo.org>
Mon, 3 Feb 2014 21:20:24 +0000 (21:20 +0000)
examples/sub.py

index 81900d5c9b549811874ecfbe36e90ce07824e1c5..0b121ebae4de2b4434edb2259b3ab41477317318 100755 (executable)
@@ -61,8 +61,5 @@ mqttc.connect("m2m.eclipse.org", 1883, 60)
 mqttc.subscribe("$SYS/#", 0)
 
 
-rc = 0
-while rc == 0:
-    rc = mqttc.loop()
+mqttc.loop_forever()
 
-print("rc: "+str(rc))