mirror of
https://github.com/jellyfin/jellyfin-sdk-kotlin.git
synced 2024-11-22 21:39:49 +00:00
Fix race condition in DefaultSocketApi causing disconnection loop when changing credentials
Some checks failed
Repo / Label merge conflict / Triage (push) Has been cancelled
SDK / Documentation / Lint (push) Has been cancelled
SDK / Documentation / Build Vitepress (push) Has been cancelled
SDK / Documentation / Build Dokka (push) Has been cancelled
SDK / Lint / Lint (push) Has been cancelled
SDK / Publish / Publish (push) Has been cancelled
SDK / Test / Test (17) (push) Has been cancelled
SDK / Test / Test (21) (push) Has been cancelled
SDK / Test / Validate binary compatibility (push) Has been cancelled
SDK / Test / Verify OpenAPI sources (push) Has been cancelled
SDK / Unstable branch / Update (push) Has been cancelled
SDK / Documentation / Deploy (push) Has been cancelled
Some checks failed
Repo / Label merge conflict / Triage (push) Has been cancelled
SDK / Documentation / Lint (push) Has been cancelled
SDK / Documentation / Build Vitepress (push) Has been cancelled
SDK / Documentation / Build Dokka (push) Has been cancelled
SDK / Lint / Lint (push) Has been cancelled
SDK / Publish / Publish (push) Has been cancelled
SDK / Test / Test (17) (push) Has been cancelled
SDK / Test / Test (21) (push) Has been cancelled
SDK / Test / Validate binary compatibility (push) Has been cancelled
SDK / Test / Verify OpenAPI sources (push) Has been cancelled
SDK / Unstable branch / Update (push) Has been cancelled
SDK / Documentation / Deploy (push) Has been cancelled
This commit is contained in:
parent
d7656db2e7
commit
89d3146891
@ -144,7 +144,7 @@ public class DefaultSocketApi(
|
||||
.state
|
||||
.onEach { connectionState ->
|
||||
// Automatically reconnect when the socket is closed while subscriptions are active
|
||||
if (_subscriptionCount > 0 && _currentCredentials != null && connectionState is SocketConnectionState.Disconnected) {
|
||||
if (_subscriptionCount > 0 && _currentCredentials != null && connectionState is SocketConnectionState.Disconnected && !reconnectMutex.isLocked) {
|
||||
socketReconnectPolicy.notifyDisconnected()
|
||||
|
||||
val reconnectDelay = socketReconnectPolicy.getReconnectDelay()
|
||||
|
Loading…
Reference in New Issue
Block a user