Skip to content
Snippets Groups Projects
Commit 344be73e authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Duncan McNamara
Browse files

Fix ConcurrentModificationException

parent e9667f39
No related branches found
No related tags found
1 merge request!2013Crash fixes
......@@ -379,7 +379,10 @@ object RemoteAccessWebSockets {
private fun addToQueue(wsMessage: RemoteAccessServer.WSMessage) {
val typesDuplicates = arrayOf("now-playing", "play-queue", "auth", "volume", "player-status", "login-needed", "ml-refresh-needed", "playback-control-forbidden")
if (wsMessage.type in typesDuplicates) {
messageQueue.removeIf { it.type == wsMessage.type }
try {
messageQueue.removeIf { it.type == wsMessage.type }
} catch (_: ConcurrentModificationException) {
}
}
messageQueue.add(wsMessage)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment