Force process crash on mqtt error

To circumvent this error https://community.flic.io/topic/18257/cannot-push-beyond-allocated-stack-fatal-error
This commit is contained in:
Mike Vostrikov committed 2023-08-19 01:48:23 -04:00
1 parent a633db73c8
commit 7effbdb27a
1 file changed
+1 -3
+1 -3
View File
@@ -220,10 +220,8 @@ mqtt.on('disconnected', function() {
mqtt.on('error', function () { mqtt.on('error', function () {
setTimeout(function () { setTimeout(function () {
mqtt.connect(); throw new Error("Crashed")
}, 1000); }, 1000);
}); });
mqtt.connect(); mqtt.connect();