Skip to content

Commit

Permalink
Modify default keep_alive_secs of samples (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuma-m authored Jul 20, 2021
1 parent 7ceb5e5 commit f3a0021
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
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

0 comments on commit f3a0021

Please sign in to comment.