Skip to content

Modify default keep_alive_secs of samples #217

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 1 commit into from
Jul 20, 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
2 changes: 1 addition & 1 deletion samples/basic_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def try_iot_endpoints():
on_connection_resumed=on_connection_resumed,
client_id=args.thing_name,
clean_session=False,
keep_alive_secs=6)
keep_alive_secs=30)

connect_future = mqtt_connection.connect()
connect_future.result()
Expand Down
4 changes: 2 additions & 2 deletions samples/fleetprovisioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def waitForRegisterThingResponse():
ca_filepath=args.root_ca,
client_id=args.client_id,
clean_session=False,
keep_alive_secs=6)
keep_alive_secs=30)

else:
mqtt_connection = mqtt_connection_builder.mtls_from_path(
Expand All @@ -262,7 +262,7 @@ def waitForRegisterThingResponse():
on_connection_interrupted=on_connection_interrupted,
on_connection_resumed=on_connection_resumed,
clean_session=False,
keep_alive_secs=6,
keep_alive_secs=30,
http_proxy_options=proxy_options)

print("Connecting to {} with client ID '{}'...".format(
Expand Down
4 changes: 2 additions & 2 deletions samples/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def on_update_job_execution_rejected(rejected):
ca_filepath=args.root_ca,
client_id=args.client_id,
clean_session=False,
keep_alive_secs=6)
keep_alive_secs=30)

else:
mqtt_connection = mqtt_connection_builder.mtls_from_path(
Expand All @@ -255,7 +255,7 @@ def on_update_job_execution_rejected(rejected):
ca_filepath=args.root_ca,
client_id=args.client_id,
clean_session=False,
keep_alive_secs=6,
keep_alive_secs=30,
http_proxy_options=proxy_options)

print("Connecting to {} with client ID '{}'...".format(
Expand Down
4 changes: 2 additions & 2 deletions samples/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def on_message_received(topic, payload, dup, qos, retain, **kwargs):
on_connection_resumed=on_connection_resumed,
client_id=args.client_id,
clean_session=False,
keep_alive_secs=6)
keep_alive_secs=30)

else:
mqtt_connection = mqtt_connection_builder.mtls_from_path(
Expand All @@ -121,7 +121,7 @@ def on_message_received(topic, payload, dup, qos, retain, **kwargs):
on_connection_resumed=on_connection_resumed,
client_id=args.client_id,
clean_session=False,
keep_alive_secs=6,
keep_alive_secs=30,
http_proxy_options=proxy_options)

print("Connecting to {} with client ID '{}'...".format(
Expand Down
4 changes: 2 additions & 2 deletions samples/shadow.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def user_input_thread_fn():
ca_filepath=args.root_ca,
client_id=args.client_id,
clean_session=True,
keep_alive_secs=6)
keep_alive_secs=30)

else:
mqtt_connection = mqtt_connection_builder.mtls_from_path(
Expand All @@ -309,7 +309,7 @@ def user_input_thread_fn():
ca_filepath=args.root_ca,
client_id=args.client_id,
clean_session=True,
keep_alive_secs=6,
keep_alive_secs=30,
http_proxy_options=proxy_options)

print("Connecting to {} with client ID '{}'...".format(
Expand Down