Skip to content

Commit f3a0021

Browse files
authored
Modify default keep_alive_secs of samples (#217)
1 parent 7ceb5e5 commit f3a0021

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

samples/basic_discovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def try_iot_endpoints():
8181
on_connection_resumed=on_connection_resumed,
8282
client_id=args.thing_name,
8383
clean_session=False,
84-
keep_alive_secs=6)
84+
keep_alive_secs=30)
8585

8686
connect_future = mqtt_connection.connect()
8787
connect_future.result()

samples/fleetprovisioning.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def waitForRegisterThingResponse():
249249
ca_filepath=args.root_ca,
250250
client_id=args.client_id,
251251
clean_session=False,
252-
keep_alive_secs=6)
252+
keep_alive_secs=30)
253253

254254
else:
255255
mqtt_connection = mqtt_connection_builder.mtls_from_path(
@@ -262,7 +262,7 @@ def waitForRegisterThingResponse():
262262
on_connection_interrupted=on_connection_interrupted,
263263
on_connection_resumed=on_connection_resumed,
264264
clean_session=False,
265-
keep_alive_secs=6,
265+
keep_alive_secs=30,
266266
http_proxy_options=proxy_options)
267267

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

samples/jobs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def on_update_job_execution_rejected(rejected):
244244
ca_filepath=args.root_ca,
245245
client_id=args.client_id,
246246
clean_session=False,
247-
keep_alive_secs=6)
247+
keep_alive_secs=30)
248248

249249
else:
250250
mqtt_connection = mqtt_connection_builder.mtls_from_path(
@@ -255,7 +255,7 @@ def on_update_job_execution_rejected(rejected):
255255
ca_filepath=args.root_ca,
256256
client_id=args.client_id,
257257
clean_session=False,
258-
keep_alive_secs=6,
258+
keep_alive_secs=30,
259259
http_proxy_options=proxy_options)
260260

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

samples/pubsub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def on_message_received(topic, payload, dup, qos, retain, **kwargs):
107107
on_connection_resumed=on_connection_resumed,
108108
client_id=args.client_id,
109109
clean_session=False,
110-
keep_alive_secs=6)
110+
keep_alive_secs=30)
111111

112112
else:
113113
mqtt_connection = mqtt_connection_builder.mtls_from_path(
@@ -121,7 +121,7 @@ def on_message_received(topic, payload, dup, qos, retain, **kwargs):
121121
on_connection_resumed=on_connection_resumed,
122122
client_id=args.client_id,
123123
clean_session=False,
124-
keep_alive_secs=6,
124+
keep_alive_secs=30,
125125
http_proxy_options=proxy_options)
126126

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

samples/shadow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def user_input_thread_fn():
298298
ca_filepath=args.root_ca,
299299
client_id=args.client_id,
300300
clean_session=True,
301-
keep_alive_secs=6)
301+
keep_alive_secs=30)
302302

303303
else:
304304
mqtt_connection = mqtt_connection_builder.mtls_from_path(
@@ -309,7 +309,7 @@ def user_input_thread_fn():
309309
ca_filepath=args.root_ca,
310310
client_id=args.client_id,
311311
clean_session=True,
312-
keep_alive_secs=6,
312+
keep_alive_secs=30,
313313
http_proxy_options=proxy_options)
314314

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

0 commit comments

Comments
 (0)