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')
}
})
})
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') } }) })