Skip to content

Commit d338260

Browse files
author
Fabrizio Mirabito
committed
reject unauthorized and log userId
1 parent 2ffb59c commit d338260

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/connection/Connection.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const BaseConnectionOptions: Partial<ConnectionOptions> = {
1111
clean: true,
1212
keepalive: 30,
1313
properties: {},
14+
rejectUnauthorized: false,
1415
protocolVersion: 4,
1516
connectTimeout: 30000,
1617
};
@@ -44,6 +45,8 @@ export class Connection implements IConnection {
4445
username: userId,
4546
password: token,
4647
};
48+
console.log(userId);
49+
4750

4851
const connection = new Connection();
4952
connection.client = mqtt.connect(`wss://${host}:${port}/mqtt`, {

0 commit comments

Comments
 (0)