paho client does not respond

26 views
Skip to first unread message

Alican KAYIKCI

unread,
Mar 21, 2017, 2:43:52 AM3/21/17
to MQTT
Hello,
i've a mosquitto broker on an embedded device. and an embedded publisher device which sends tempreture info. So from pc i'm trying to read this tempreture values via subscribing to same publisher devices topic. My problem is on PC side at python paho client. i have attached my simple code which i get from an example. For a while the code was working. But two days ago it stops working. Of course it does not related with the time but it is weird. i'm executing the code in an virtualenv and from command prompt by typing >python mqttc_temp.py . By the way my OS is windows 10.  after restarting the pc, if the code can't find a broker in the network it stops with an exception. Then when i try to execute code while a broker exists, nothing happens. Command prompt or python returning me nothing and waiting for a new command which i had not try to execute something. as you may feel from the code i'm a newbie. but i'm searching very hard. i suspect from my searchings that i can't stop the loop properly and cause of that the client loop continue to working on. i'll be glad if you may give me some advise about the issue and the solving way.     
mqttc_temp.py
Reply all
Reply to author
Forward
0 new messages