mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-11-16 16:12:32 +01:00
Fix a bunch of random bugs
This commit is contained in:
parent
6a3446a3d5
commit
ab33d7a647
@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Security
|
||||
|
||||
## [1.2.3] - 2021-01-08
|
||||
### Fixed
|
||||
- [2021-01-08] Fix a bunch of stupid edge cases [@carbotaniuman].
|
||||
|
||||
## [1.2.2] - 2020-08-21
|
||||
### Changed
|
||||
- [2020-08-11] Moved to a Java implementation of NaCl [@carbotaniuman].
|
||||
|
@ -174,7 +174,14 @@ class ServerManager(serverSettings: ServerSettings, devSettings: DevSettings, ma
|
||||
private fun pingControl() {
|
||||
val state = this.state as Running
|
||||
|
||||
val newSettings = serverHandler.pingControl(state.settings)
|
||||
val newSettings = serverHandler.pingControl(state.settings)?.run {
|
||||
// copy the old tls over so we can do a simply equality check
|
||||
if (tls == null) {
|
||||
copy(tls = state.settings.tls)
|
||||
} else {
|
||||
this
|
||||
}
|
||||
}
|
||||
if (newSettings != null) {
|
||||
LOGGER.info { "Server settings received: $newSettings" }
|
||||
|
||||
@ -183,7 +190,7 @@ class ServerManager(serverSettings: ServerSettings, devSettings: DevSettings, ma
|
||||
"Outdated build detected! Latest: ${newSettings.latestBuild}, Current: ${Constants.CLIENT_BUILD}"
|
||||
}
|
||||
}
|
||||
if (newSettings.tls != null || newSettings.imageServer != state.settings.imageServer) {
|
||||
if (state.settings != newSettings) {
|
||||
// certificates or upstream url must have changed, restart webserver
|
||||
LOGGER.info { "Doing internal restart of HTTP server to refresh certs/upstream URL" }
|
||||
|
||||
|
@ -29,6 +29,7 @@ import java.io.BufferedInputStream
|
||||
import java.io.BufferedOutputStream
|
||||
import java.io.File
|
||||
import java.io.InputStream
|
||||
import java.lang.IllegalArgumentException
|
||||
import java.time.Clock
|
||||
import java.time.OffsetDateTime
|
||||
import java.util.*
|
||||
@ -69,7 +70,6 @@ import org.jetbrains.exposed.sql.Database
|
||||
import org.jetbrains.exposed.sql.SchemaUtils
|
||||
import org.jetbrains.exposed.sql.transactions.transaction
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.lang.IllegalArgumentException
|
||||
|
||||
private val LOGGER = LoggerFactory.getLogger(ImageServer::class.java)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user