From bf154f0b85bcd391bc0dab281b73452d46d52a7d Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Fri, 6 Dec 2024 22:03:57 +0100 Subject: [PATCH] Fix exception when connecting to WS --- build.gradle.kts | 1 - .../kotlin/dev/schlaubi/lavakord/audio/internal/NodeImpl.kt | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2b8673cf..2d4e337e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,6 @@ plugins { } group = "dev.schlaubi.lavakord" -version = "8.2.0" allprojects { repositories { diff --git a/core/src/commonMain/kotlin/dev/schlaubi/lavakord/audio/internal/NodeImpl.kt b/core/src/commonMain/kotlin/dev/schlaubi/lavakord/audio/internal/NodeImpl.kt index 894229ab..f8f41dbd 100644 --- a/core/src/commonMain/kotlin/dev/schlaubi/lavakord/audio/internal/NodeImpl.kt +++ b/core/src/commonMain/kotlin/dev/schlaubi/lavakord/audio/internal/NodeImpl.kt @@ -102,7 +102,9 @@ internal class NodeImpl( @OptIn(DelicateCoroutinesApi::class) internal suspend fun connect(doResume: Boolean = false, initialSessionId: String? = null) { val resume = doResume || initialSessionId != null - sessionId = initialSessionId ?: sessionId + if (initialSessionId != null) { + sessionId = initialSessionId + } session = try { connect(resume || initialSessionId != null) { addUrl()