Try and not crash with subscriptions

Failed subscriptions will try agian in 1 min
This commit is contained in:
Ben Hardill 2021-04-08 10:44:56 +01:00
parent 5e819fdfcd
commit f24a792b03
No known key found for this signature in database
GPG Key ID: 74DD076979ABB1E7

View File

@ -152,6 +152,14 @@ module.exports = function(RED) {
}
});
sub_request.on('error', function(){
// devie probably offline
// try again after a minute
setTimeout( function() {
subscribe(node)
}, 60000)
})
sub_request.end();
}
}