Skip to content

Commit

Permalink
Merge pull request #360 from matrix-org/dmr/invalidate-token-mutex
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson authored Nov 2, 2023
2 parents 0e8d4a8 + 5e65210 commit 13d4e02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests-integration/v3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 13d4e02

Please sign in to comment.