Crashfix on stopping StateSync #2302

This commit is contained in:
Koen J 2025-06-05 13:14:57 +02:00
commit 40c195d4a0

View file

@ -803,8 +803,12 @@ class SyncService(
_relaySession = null _relaySession = null
_serverSocket?.close() _serverSocket?.close()
_serverSocket = null _serverSocket = null
synchronized(_sessions) {
_sessions.values.toList()
}.forEach { it.close() }
synchronized(_sessions) { synchronized(_sessions) {
_sessions.values.forEach { it.close() }
_sessions.clear() _sessions.clear()
} }
} }