I'm running a Minecraft server with a RCON connection.
My goal is to allow for the MC server to restart and the program running RCON can reconnect happily without a process restart. I'm using a simple interval timer running every minute that will attempt a reconnection if it needs to.
My issue is that when I reconnect to RCON after a restart, the auth event isn't ran. And the Thread RCON Client /127.0.0.1 started response isn't outputted as an event either, meaning I have no way to detect if the reconnectionn worked correctly.
In testing, I also noticed that the hasAuthed flag isn't always accurate either. It doesn't seem to get set to false when losing connection.
I'm running a Minecraft server with a RCON connection.
My goal is to allow for the MC server to restart and the program running RCON can reconnect happily without a process restart. I'm using a simple interval timer running every minute that will attempt a reconnection if it needs to.
My issue is that when I reconnect to RCON after a restart, the
auth
event isn't ran. And theThread RCON Client /127.0.0.1 started
response isn't outputted as an event either, meaning I have no way to detect if the reconnectionn worked correctly.In testing, I also noticed that the
hasAuthed
flag isn't always accurate either. It doesn't seem to get set to false when losing connection.Any help would be great!