Skip to content

Commit

Permalink
#96 make development and test restarts quicker
Browse files Browse the repository at this point in the history
  • Loading branch information
angryziber committed Dec 13, 2024
1 parent a2f51f0 commit b7499ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* jdbc: fixed usage of multiple different DataSources when there is an active transaction
* json: TSGenerator will now use more type-safe string template types for java.time classes, e.g. `${number}-${number}-${number}` instead of `string`
* server: `Server(InetSocketAddress(0))` can now be used to bind to any available port.
* server: make development and test restarts quicker by not using graceful delay #96
* jackson: serialize enums using their toString() method by default, this fixes `openapi` module usage with `jackson` #88
* liquibase: do not close jdbc connection if it was passed by user #81

Expand Down
2 changes: 1 addition & 1 deletion server/src/klite/Server.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Server(
private val http = HttpServer.create(listen, 0)
val listen: InetSocketAddress get() = http.address

fun start(gracefulStopDelaySec: Int = 3) {
fun start(gracefulStopDelaySec: Int = if (Config.isProd) 3 else 0) {
log.info("Listening on $listen")
http.start()
if (gracefulStopDelaySec >= 0) getRuntime().addShutdownHook(thread(start = false) { stop(gracefulStopDelaySec) })
Expand Down

0 comments on commit b7499ef

Please sign in to comment.