File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -139,9 +139,9 @@ def on_suback(suback_future):
139
139
else :
140
140
future .set_result (None )
141
141
142
- def callback_wrapper (topic , payload_str ):
142
+ def callback_wrapper (topic , payload_bytes ):
143
143
try :
144
- payload_obj = json .loads (payload_str )
144
+ payload_obj = json .loads (payload_bytes . decode () )
145
145
event = payload_to_class_fn (payload_obj )
146
146
except :
147
147
# can't deliver payload, invoke callback with None
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ def on_update_job_execution_rejected(rejected):
235
235
236
236
mqtt_client = mqtt .Client (client_bootstrap , tls_context )
237
237
238
- port = 443 if io . is_alpn_available () else 8883
238
+ port = 8883
239
239
print ("Connecting to {} on port {}..." .format (args .endpoint , port ))
240
240
mqtt_connection = mqtt .Connection (
241
241
client = mqtt_client )
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ def on_message_received(topic, message):
73
73
mqtt_client = mqtt .Client (client_bootstrap , tls_context )
74
74
75
75
# Create connection
76
- port = 443 if io . is_alpn_available () else 8883
76
+ port = 8883
77
77
78
78
print ("Connecting to {} on port {} with client ID '{}'..." .format (
79
79
args .endpoint , port , args .client_id ))
Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ def user_input_thread_fn():
240
240
241
241
mqtt_client = mqtt .Client (client_bootstrap , tls_context )
242
242
243
- port = 443 if io . is_alpn_available () else 8883
243
+ port = 8883
244
244
print ("Connecting to {} on port {}..." .format (args .endpoint , port ))
245
245
mqtt_connection = mqtt .Connection (
246
246
client = mqtt_client )
You can’t perform that action at this time.
0 commit comments