Skip to content

Commit 8a56fa5

Browse files
committed
tools: normalise LocalClient timeout
Normalise the LocalClient timeouts to 1 second, since on Windows Keyboard interrupts can only be handled after the blocking receive returns or times out. Signed-off-by: Jordan Yates <jordan@embeint.com>
1 parent 8facd83 commit 8a56fa5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/infuse_iot/tools/bt_log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class SubCommand(InfuseCommand):
2525
DESCRIPTION = "Connect to remote Bluetooth device serial logs"
2626

2727
def __init__(self, args):
28-
self._client = LocalClient(default_multicast_address(), 60.0)
28+
self._client = LocalClient(default_multicast_address(), 1.0)
2929
self._decoder = TDF()
3030
self._id = args.id
3131
self._data = args.data

src/infuse_iot/tools/data_logger_sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class SubCommand(InfuseCommand):
6464
DESCRIPTION = "Synchronise data logger state from remote devices"
6565

6666
def __init__(self, args):
67-
self._client = LocalClient(default_multicast_address(), 60.0)
67+
self._client = LocalClient(default_multicast_address(), 1.0)
6868
self._min_rssi: int | None = args.rssi
6969
self._app = args.app
7070
self._out = args.out

src/infuse_iot/tools/ota_upgrade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SubCommand(InfuseCommand):
3535
DESCRIPTION = "Automatically OTA upgrade observed devices"
3636

3737
def __init__(self, args):
38-
self._client = LocalClient(default_multicast_address(), 60.0)
38+
self._client = LocalClient(default_multicast_address(), 1.0)
3939
self._min_rssi: int | None = args.rssi
4040
self._single_id: int | None = args.id
4141
self._release: ValidRelease = args.release

src/infuse_iot/tools/rpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def add_parser(cls, parser):
5353

5454
def __init__(self, args: argparse.Namespace):
5555
self._args = args
56-
self._client = LocalClient(default_multicast_address(), 10.0)
56+
self._client = LocalClient(default_multicast_address(), 1.0)
5757
self._command: InfuseRpcCommand = args.rpc_class(args)
5858
self._request_id = random.randint(0, 2**32 - 1)
5959
self._max_payload = 0

0 commit comments

Comments
 (0)