Merge pull request #477 from TimothyHarder/hardertimothy/issue-366

Issue #366 TCP connection error handling
This commit is contained in:
Ben Meadors
2024-01-16 10:37:43 -06:00
committed by GitHub

View File

@@ -948,9 +948,14 @@ def common():
if args.ble:
client = BLEInterface(args.ble, debugOut=logfile, noProto=args.noproto)
elif args.host:
client = meshtastic.tcp_interface.TCPInterface(
args.host, debugOut=logfile, noProto=args.noproto
)
try:
client = meshtastic.tcp_interface.TCPInterface(
args.host, debugOut=logfile, noProto=args.noproto
)
except Exception as ex:
meshtastic.util.our_exit(
f"Error connecting to {args.host}:{ex}", 1
)
else:
try:
client = meshtastic.serial_interface.SerialInterface(