Skip to content

Commit 632dc47

Browse files
authored
update builder to take protocol_operation_timeout_ms (#171)
1 parent af53dea commit 632dc47

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

awsiot/mqtt_connection_builder.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@
6363
the connection is invalid and attempts to reconnect.
6464
Default is 3000ms (3 seconds). This duration must be shorter than `keep_alive_secs`.
6565
66+
**protocol_operation_timeout_ms** (`int`): Milliseconds to wait for the response to the operation
67+
requires response by protocol. Set to zero to disable timeout. Otherwise,
68+
the operation will fail if no response is received within this amount of time after
69+
the packet is written to the socket
70+
It applied to PUBLISH (QoS>0) and UNSUBSCRIBE now.
71+
6672
**will** (:class:`awscrt.mqtt.Will`): Will to send with CONNECT packet. The will is
6773
published by the server when its connection to the client is unexpectedly lost.
6874
@@ -180,6 +186,7 @@ def _builder(
180186
reconnect_max_timeout_secs=kwargs.get('reconnect_max_timeout_secs', 60),
181187
keep_alive_secs=kwargs.get('keep_alive_secs', 1200),
182188
ping_timeout_ms=kwargs.get('ping_timeout_ms', 3000),
189+
protocol_operation_timeout_ms=kwargs.get('protocol_operation_timeout_ms', 0),
183190
will=kwargs.get('will'),
184191
username=username,
185192
password=kwargs.get('password'),

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"Operating System :: OS Independent",
2020
],
2121
install_requires=[
22-
'awscrt==0.10.8',
22+
'awscrt==0.11.4',
2323
],
2424
python_requires='>=3.5',
2525
)

0 commit comments

Comments
 (0)