python script 0mq update
[svn42.git] / bridge-old-sensors-zmq.py
index 66de9af..016c495 100755 (executable)
@@ -216,6 +216,11 @@ def exitHandler(signum, frame):
   except:
     pass
   time.sleep(0.1)
+  try:
+    zmqsub.close()
+    zmqctx.destroy()
+  except:
+    pass
   sys.exit(0)
   
 #signals proapbly don't work because of readline
@@ -240,5 +245,7 @@ zmqpub.connect("tcp://wuzzler.realraum.at:4243")
 #listen for sensor data and forward them
 trackSensorStatus(uwscfg, zmqpub)
 
+zmqsub.close()
+zmqctx.destroy()