Fix state transition bug

This commit is contained in:
carbotaniuman 2020-06-27 12:26:29 -05:00
parent 537ef30e88
commit 22fc42e7bc

View file

@ -190,12 +190,12 @@ class MangaDexClient(private val clientSettings: ClientSettings) {
LOGGER.info("Shutting down server as hourly bandwidth limit reached") LOGGER.info("Shutting down server as hourly bandwidth limit reached")
} }
this.state = GracefulShutdown(lastRunning = state) this.state = GracefulShutdown(lastRunning = state)
} else {
pingControl()
} }
pingControl()
} }
} catch (e: Exception) { } catch (e: Exception) {
LOGGER.warn("Main loop failed", e) LOGGER.warn("Graceful shutdown checker failed", e)
} }
}, 45, 45, TimeUnit.SECONDS) }, 45, 45, TimeUnit.SECONDS)
} }