Re-issue tokens when clients initially connect. (#569)

This ensures if they are disconnected before token is refreshed, they
could reconnect back with a valid token.
This commit is contained in:
David Zhao
2022-03-25 23:55:19 -07:00
committed by GitHub
parent 51cf626a70
commit f2556483a3
2 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ func (r *RedisRouter) SetNodeForRoom(_ context.Context, roomName livekit.RoomNam
}
func (r *RedisRouter) ClearRoomState(_ context.Context, roomName livekit.RoomName) error {
if err := r.rc.HDel(r.ctx, NodeRoomKey, string(roomName)).Err(); err != nil {
if err := r.rc.HDel(context.Background(), NodeRoomKey, string(roomName)).Err(); err != nil {
return errors.Wrap(err, "could not clear room state")
}
return nil