mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Remake ServerHandler on Server restart instead of settings replace
This commit is contained in:
parent
1d1e9e1886
commit
8a2ae1b61a
|
@ -69,7 +69,7 @@ class MangaDexClient(private val clientSettingsFile: String) {
|
|||
// state must only be accessed from the thread on the executorService
|
||||
private var state: State
|
||||
|
||||
private val serverHandler: ServerHandler
|
||||
private var serverHandler: ServerHandler
|
||||
private val statsMap: MutableMap<Instant, Statistics> = Collections
|
||||
.synchronizedMap(object : LinkedHashMap<Instant, Statistics>(240) {
|
||||
override fun removeEldestEntry(eldest: Map.Entry<Instant, Statistics>): Boolean {
|
||||
|
@ -408,7 +408,7 @@ class MangaDexClient(private val clientSettingsFile: String) {
|
|||
LOGGER.info { "Stopping Server to reload ClientSettings" }
|
||||
|
||||
this.state = GracefulShutdown(state, nextState = Uninitialized(clientSettings = newSettings), action = {
|
||||
serverHandler.setClientSettings(newSettings)
|
||||
serverHandler = ServerHandler(newSettings)
|
||||
LOGGER.info { "Reloaded ClientSettings: $newSettings" }
|
||||
|
||||
LOGGER.info { "Starting Server after reloading ClientSettings" }
|
||||
|
|
Loading…
Reference in a new issue