From de937ba50a2d0b973c28ed7b5235a304c3d367d8 Mon Sep 17 00:00:00 2001 From: Freya Arbjerg Date: Tue, 17 Oct 2023 14:02:21 +0200 Subject: [PATCH] Reconnect on any JVM Exception --- .../kotlin/dev/schlaubi/lavakord/audio/internal/Platform.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/jvmMain/kotlin/dev/schlaubi/lavakord/audio/internal/Platform.kt b/core/src/jvmMain/kotlin/dev/schlaubi/lavakord/audio/internal/Platform.kt index 760f5f8f..97aac9b1 100644 --- a/core/src/jvmMain/kotlin/dev/schlaubi/lavakord/audio/internal/Platform.kt +++ b/core/src/jvmMain/kotlin/dev/schlaubi/lavakord/audio/internal/Platform.kt @@ -23,9 +23,7 @@ internal actual suspend fun NodeImpl.connect( ) } catch (e: ConnectTimeoutException) { internalReconnect(IllegalStateException("The connection to the node timed out", e)) - } catch (e: ClientRequestException) { - internalReconnect(e) - } catch (e: ConnectException) { + } catch (e: Exception) { internalReconnect(e) } }