ServerSync

ServerSync

48.5k Downloads

[Feature Request] [Server] Real time config reload

raindropworks opened this issue ยท 3 comments

commented

Serversync Version:

2.6.17

Minecraft Version:

1.12.2

Issue:

Is there a way to have ServerSync query it's server config file dynamically when a client connects to it? I had a mod blacklisted thinking it was a server-side only mod, but then when the server refused to allow the connection due to the missing mod, it forced me to fully restart the server just to get ServerSync to reload it's config

commented

Hmm, could do directory watching for changes to the config.

Or read on demand, shall have a ponder on it.

commented

Was just an idea I had ... I know usually Forge mods load their config on startup, and you don't -want- them to re-check live, but since this mod isn't like most ...

commented

There is nothing stopping SS from live reloading config changes really.

Just need to carefully think about file locking issues when watching for changes, my original thought was to have SS load the config whenever it creates a client handler thread, but when put in the context of several connections per second that sounds highly resource wasteful (need to do some research on how intensive the 'read' process is).

Could also do a read if changed style (on push), I.E query the config when a client connects to see if it's last modified date is different read new config if it has.