crypto: Use getOrPut instead of getOrDefault
getOrDefault won't insert the default value into the map, while we do want it to be inserted.
This commit is contained in:
parent
504fd95b26
commit
c266842da9
|
@ -874,7 +874,7 @@ internal class DefaultCryptoService @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
val keyShareLock = roomKeyShareLocks.getOrDefault(roomId, Mutex())
|
||||
val keyShareLock = roomKeyShareLocks.getOrPut(roomId, { Mutex() })
|
||||
|
||||
keyShareLock.withLock {
|
||||
coroutineScope {
|
||||
|
|
Loading…
Reference in New Issue