You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A reconnect is attempted on a ECONNRESET without any throttling, causing a potential DOS of the elk device. This is causing downstream issues seen in homebridge-elkm1.
I'm not sure, based on other use cases for elkmon, whether a throttle or a removal of the single use case retry would be better, but it should be consistent across errors and have a way to prevent overloading the device. Even adding a 5 second timeout before the retry would prevent most negative effects.
// error event handler
this.connection.on('error', (err) => {
if (err.code === 'ECONNREFUSED') {
this.emit('error', 'Connection to M1XEP failed!');
} else if (err.code === 'ECONNRESET') {
this.emit('error', err.code);
// connection was reset, attempt to reconnect
if (this.connection) {
this.connection.destroy();
}
this.connect();
} else {
this.emit('error', err.code);
}
});
The text was updated successfully, but these errors were encountered:
A reconnect is attempted on a ECONNRESET without any throttling, causing a potential DOS of the elk device. This is causing downstream issues seen in homebridge-elkm1.
paulw11/homebridge-elkm1#35
I'm not sure, based on other use cases for elkmon, whether a throttle or a removal of the single use case retry would be better, but it should be consistent across errors and have a way to prevent overloading the device. Even adding a 5 second timeout before the retry would prevent most negative effects.
The text was updated successfully, but these errors were encountered: