File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -314,11 +314,11 @@ static int mqtt_reconnect(instance* inst){
314
314
315
315
//prepare CONNECT message header
316
316
variable_header [6 ] = data -> mqtt_version ;
317
- variable_header [7 ] = 0x02 /*clean start*/ | (data -> user ? 0x80 : 0x00 ) | (data -> user ? 0x40 : 0x00 );
317
+ variable_header [7 ] = 0x02 /*clean start*/ | (data -> user ? 0x80 : 0x00 ) | (data -> password ? 0x40 : 0x00 );
318
318
319
319
if (data -> mqtt_version == 0x05 ){ //mqtt v5 has additional options
320
320
//push number of option bytes (as a varint, no less) before actually pushing the option data.
321
- //obviously someone thought saving 3 whole bytes in exchange for not being able to sequentially creating the package was smart..
321
+ //obviously someone thought saving 3 whole bytes in exchange for not being able to sequentially create the package was smart..
322
322
variable_header [vh_offset ++ ] = 8 ;
323
323
//push maximum packet size option
324
324
variable_header [vh_offset ++ ] = 0x27 ;
You can’t perform that action at this time.
0 commit comments