play session: always log fatal exception

This commit is contained in:
Moritz Zwerger 2025-03-31 19:43:18 +02:00
parent 1799d4908b
commit f9617eecdf
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -1,6 +1,6 @@
/*
* Minosoft
* Copyright (C) 2020-2024 Moritz Zwerger
* Copyright (C) 2020-2025 Moritz Zwerger
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
@ -119,7 +119,9 @@ class PlaySession(
init {
var errored = false
this::error.observe(this) {
if (errored || it == null) return@observe
if (it == null) return@observe
Log.log(LogMessageType.GENERAL, LogLevels.FATAL) { it }
if (errored) return@observe
ERRORED_CONNECTIONS += this
cleanupErrors()
state = PlaySessionStates.ERROR