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:
1 parent
a633db73c8
commit
7effbdb27a
1 file changed
+4
-6
@@ -218,12 +218,10 @@ mqtt.on('disconnected', function() {
|
|||||||
mqtt.connect();
|
mqtt.connect();
|
||||||
});
|
});
|
||||||
|
|
||||||
mqtt.on('error', function() {
|
mqtt.on('error', function () {
|
||||||
setTimeout(function (){
|
setTimeout(function () {
|
||||||
mqtt.connect();
|
throw new Error("Crashed")
|
||||||
}, 1000);
|
}, 1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mqtt.connect();
|
mqtt.connect();
|
||||||
Reference in new issue
Block a user