mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Dont lock clients when disabling
This commit is contained in:
@@ -395,8 +395,9 @@ class StatePlatform {
|
||||
}
|
||||
suspend fun selectClients(afterLoad: (() -> Unit)?, vararg ids: String) {
|
||||
withContext(Dispatchers.IO) {
|
||||
var removed: MutableList<IPlatformClient>;
|
||||
synchronized(_clientsLock) {
|
||||
val removed = _enabledClients.toMutableList();
|
||||
removed = _enabledClients.toMutableList();
|
||||
_enabledClients.clear();
|
||||
for (id in ids) {
|
||||
val client = getClient(id);
|
||||
@@ -412,12 +413,12 @@ class StatePlatform {
|
||||
}
|
||||
_enabledClientsPersistent.set(*ids);
|
||||
_enabledClientsPersistent.save();
|
||||
}
|
||||
|
||||
for (oldClient in removed) {
|
||||
oldClient.disable();
|
||||
onSourceDisabled.emit(oldClient);
|
||||
}
|
||||
}
|
||||
afterLoad?.invoke();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user