mqtt重连
parent
1834d70b8b
commit
cbdf836d6b
|
|
@ -95,7 +95,7 @@ const createConnection = (callback?) => {
|
|||
// 重连回调
|
||||
client.on('reconnect', () => {
|
||||
console.log('MQTT正在重连...');
|
||||
client = mqtt.connect(connectUrl, options);
|
||||
// client = mqtt.connect(connectUrl, options);
|
||||
});
|
||||
});
|
||||
// const clientId = 'mqttx_' + Math.random().toString(16).substring(2, 8);
|
||||
|
|
|
|||
Loading…
Reference in New Issue