Skip to content

Commit

Permalink
fixed timeout bug
Browse files Browse the repository at this point in the history
  • Loading branch information
VladRomero committed Jun 7, 2017
1 parent e98e79a commit b3e7810
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/utils/BarracksMessagingSDKProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ class BarracksMessagingSDKProxy {
console.log('qos ' + messageReceived.qos);
}, { qos: 1 });

setTimeout(function () {
barracksMessenger.end();
resolve();
}, timeout);
if (timeout) {
setTimeout(function() {
barracksMessenger.end();
resolve();
}, timeout);
}
});
}
}
Expand Down

0 comments on commit b3e7810

Please sign in to comment.