Skip to content

update builder to take protocol_operation_timeout_ms #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions awsiot/mqtt_connection_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
the connection is invalid and attempts to reconnect.
Default is 3000ms (3 seconds). This duration must be shorter than `keep_alive_secs`.

**protocol_operation_timeout_ms** (`int`): Milliseconds to wait for the response to the operation
requires response by protocol. Set to zero to disable timeout. Otherwise,
the operation will fail if no response is received within this amount of time after
the packet is written to the socket
It applied to PUBLISH (QoS>0) and UNSUBSCRIBE now.

**will** (:class:`awscrt.mqtt.Will`): Will to send with CONNECT packet. The will is
published by the server when its connection to the client is unexpectedly lost.

Expand Down Expand Up @@ -180,6 +186,7 @@ def _builder(
reconnect_max_timeout_secs=kwargs.get('reconnect_max_timeout_secs', 60),
keep_alive_secs=kwargs.get('keep_alive_secs', 1200),
ping_timeout_ms=kwargs.get('ping_timeout_ms', 3000),
protocol_operation_timeout_ms=kwargs.get('protocol_operation_timeout_ms', 0),
will=kwargs.get('will'),
username=username,
password=kwargs.get('password'),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"Operating System :: OS Independent",
],
install_requires=[
'awscrt==0.10.8',
'awscrt==0.11.4',
],
python_requires='>=3.5',
)