mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 14:22:26 +08:00
读锁改写锁
This commit is contained in:
@@ -462,8 +462,8 @@ func (k *KcpConnectManager) SetSession(session *Session, convId uint64, userId u
|
||||
}
|
||||
|
||||
func (k *KcpConnectManager) DeleteSession(convId uint64, userId uint32) {
|
||||
k.sessionMapLock.RLock()
|
||||
k.sessionMapLock.Lock()
|
||||
delete(k.sessionConvIdMap, convId)
|
||||
delete(k.sessionUserIdMap, userId)
|
||||
k.sessionMapLock.RUnlock()
|
||||
k.sessionMapLock.Unlock()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user