Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 70f5694

Browse files
author
Stefania
committedNov 16, 2018
use our paho branch
1 parent c5a4d3c commit 70f5694

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
 

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"dependencies": {
1919
"cbor-js": "^0.1.0",
20-
"paho-client": "eclipse/paho.mqtt.javascript"
20+
"paho-client": "bcmi-labs/paho.mqtt.javascript"
2121
},
2222
"devDependencies": {
2323
"babel-cli": "^6.26.0",

‎src/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const connect = options => new Promise((resolve, reject) => {
5252
ssl,
5353
token: options.token,
5454
onDisconnect: options.onDisconnect,
55+
onTrace: options.onTrace,
5556
};
5657

5758
if (!opts.host) {
@@ -133,6 +134,12 @@ const connect = options => new Promise((resolve, reject) => {
133134

134135
connectionOpts.password = opts.token;
135136

137+
if (typeof opts.onTrace === 'function') {
138+
client.trace = (log) => {
139+
opts.onTrace(log);
140+
};
141+
}
142+
136143
client.connect(connectionOpts);
137144
}, (error) => {
138145
throw new Error(error);

0 commit comments

Comments
 (0)
Please sign in to comment.