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):
139139 else :
140140 future .set_result (None )
141141
142- def callback_wrapper (topic , payload_str ):
142+ def callback_wrapper (topic , payload_bytes ):
143143 try :
144- payload_obj = json .loads (payload_str )
144+ payload_obj = json .loads (payload_bytes . decode () )
145145 event = payload_to_class_fn (payload_obj )
146146 except :
147147 # 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):
235235
236236 mqtt_client = mqtt .Client (client_bootstrap , tls_context )
237237
238- port = 443 if io . is_alpn_available () else 8883
238+ port = 8883
239239 print ("Connecting to {} on port {}..." .format (args .endpoint , port ))
240240 mqtt_connection = mqtt .Connection (
241241 client = mqtt_client )
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ def on_message_received(topic, message):
7373 mqtt_client = mqtt .Client (client_bootstrap , tls_context )
7474
7575 # Create connection
76- port = 443 if io . is_alpn_available () else 8883
76+ port = 8883
7777
7878 print ("Connecting to {} on port {} with client ID '{}'..." .format (
7979 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():
240240
241241 mqtt_client = mqtt .Client (client_bootstrap , tls_context )
242242
243- port = 443 if io . is_alpn_available () else 8883
243+ port = 8883
244244 print ("Connecting to {} on port {}..." .format (args .endpoint , port ))
245245 mqtt_connection = mqtt .Connection (
246246 client = mqtt_client )
You can’t perform that action at this time.
0 commit comments