Skip to content

Commit

Permalink
idk
Browse files Browse the repository at this point in the history
  • Loading branch information
Geczy committed Oct 15, 2024
1 parent b337487 commit 47e170c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion packages/dota/src/dota/GSIServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function handleSocketAuth(socket: Socket, next: (err?: Error) => void) {
// Successful authentication
next()
} else {
logger.info('[GSI] Invalid token, disconnecting socket')
socket.emit('auth_error', 'Invalid token') // Send an auth error message if needed
socket.disconnect(true) // Disconnect the socket and prevent reconnection attempts
}
Expand Down
1 change: 1 addition & 0 deletions packages/dota/src/dota/validateToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export function validateToken(req: Request, res: Response, next: NextFunction) {
return
}

invalidTokens.add(token)
pendingCheckAuth.delete(token)
logger.info('[GSI] io.use Error checking auth 42', { token, client })
res.status(200).json({ error: 'Invalid token, skipping auth check' })
Expand Down

0 comments on commit 47e170c

Please sign in to comment.