mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
Merge pull request #360 from matrix-org/dmr/invalidate-token-mutex
This commit is contained in:
commit
13d4e0278d
@ -99,8 +99,10 @@ func (s *testV2Server) addAccountWithDeviceID(userID, deviceID, token string) {
|
||||
|
||||
// like invalidateToken, but doesn't do any waiting.
|
||||
func (s *testV2Server) invalidateTokenImmediately(token string) {
|
||||
s.mu.Lock()
|
||||
delete(s.tokenToUser, token)
|
||||
delete(s.tokenToDevice, token)
|
||||
s.mu.Unlock()
|
||||
}
|
||||
|
||||
// remove the token and wait until the proxy sends a request with this token, then 401 it and return.
|
||||
|
Loading…
x
Reference in New Issue
Block a user