Closed mdingena closed 3 years ago
Absolutely not intentional.
By intention it should be attempting a connection on status change if there isn't already one.
In the future, it would be good to add another condition to that, of and has console permission to avoid spamming the API with requests that will only be rejected.
Will accept a PR if you find the issue, otherwise will try and track it down after I've finished with my cleanup_01
branch.
This appears to be resolved in v2.0.0-rc.4
.
Observed behaviour
Every time the server status changes, js-tale seems to establish a new connection. I think this is not intentional behaviour, and it might be the root cause of some other issues I've been having.
Here's a dump of my logs. I've filtered it down to one specific server (my bot is connected to many different game servers at the same time).
⚠️ Important to note is that the
connection.server.on('update', ...)
event does not seems to fire inside thegroupManager.automaticConsole
connection handler. Judging by the output above,js-tale
is capable of detecting server status updates, but it does not pass these events through to the server connection event handlers.Expected behaviour
The bot should establish a server connection once and maintain that connection for the duration of the server's uptime. All server status updates should then be handled inside the automatic console connection's event handlers.