s.close()

This commit is contained in:
nessar committed 2021-12-18 17:25:57 +01:00
1 parent 1f51a8015d
commit 1cf4934935
1 file changed
+2
+2
View File
@@ -161,6 +161,7 @@ def run_publisher(addr, topic, pub_id, retain=False):
s.sendall(create_mqtt_disconnect_msg())
except KeyboardInterrupt:
s.sendall(create_mqtt_disconnect_msg())
s.close()
def run_subscriber(addr, topic, sub_id):
@@ -188,6 +189,7 @@ def run_subscriber(addr, topic, sub_id):
pass
except KeyboardInterrupt:
s.sendall(create_mqtt_disconnect_msg())
s.close()
def run_server(addr):