taoqf / MQTT.js

The MQTT client for Node.js and the browser
Other
12 stars 8 forks source link

Close event is getting fired continuously #5

Closed Mudassir-23 closed 4 years ago

Mudassir-23 commented 4 years ago

Hi @taoqf , when i try connecting to any any stream with any protocol. The connection close callback gets called regularly. Even the below snippet doesn't work. Is it a bug ?. var mqtt = require('@taoqf/react-native-mqtt') var client = mqtt.connect('mqtt://test.mosquitto.org') client.addListener('connect', () => { console.log('connected'); }); client.on('connect', function () { client.subscribe('presence', function (err) { if (!err) { client.publish('presence', 'Hello mqtt') } }) })

taoqf commented 4 years ago

https://github.com/taoqf/MQTT.js/issues/4