Skip to content

Commit

Permalink
Squash: Log signal, set exit status before beginning shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLennox committed Dec 20, 2024
1 parent eb7e17c commit 1b956bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jvb/src/main/kotlin/org/jitsi/videobridge/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ fun main() {
listOf("TERM", "HUP", "INT").forEach { signalName ->
try {
Signal.handle(Signal(signalName)) { signal ->
shutdownService.beginShutdown()
exitStatus = signal.number + 128 // Matches java.lang.Terminator
logger.info("Caught signal $signal, shutting down.")

shutdownService.beginShutdown()
}
} catch (e: IllegalArgumentException) {
/* Unknown signal on this platform, or not allowed to register this signal; that's fine. */
Expand Down

0 comments on commit 1b956bf

Please sign in to comment.