mirror of
https://github.com/meshtastic/python.git
synced 2026-04-17 13:31:43 -04:00
Fix #49 - force close socket to kill reader thread (was blocking in read)
This commit is contained in:
11
tests/close-bug.py
Normal file
11
tests/close-bug.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import sys
|
||||
import meshtastic
|
||||
import datetime, logging
|
||||
from pubsub import pub
|
||||
|
||||
#logging.basicConfig(level=logging.DEBUG)
|
||||
print(str(datetime.datetime.now()) + ": start")
|
||||
interface = meshtastic.TCPInterface(sys.argv[1])
|
||||
print(str(datetime.datetime.now()) + ": middle")
|
||||
interface.close()
|
||||
print(str(datetime.datetime.now()) + ": after close")
|
||||
Reference in New Issue
Block a user