From ca125c99b28fc48ec31c1900ddd41eacb730fb5b Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Tue, 29 Sep 2020 15:54:55 +0200 Subject: [PATCH] throttle /lobby/seeks XHR --- ui/lobby/src/xhr.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/lobby/src/xhr.ts b/ui/lobby/src/xhr.ts index 5c7685ec93..16ad84c461 100644 --- a/ui/lobby/src/xhr.ts +++ b/ui/lobby/src/xhr.ts @@ -1,7 +1,8 @@ import * as xhr from 'common/xhr'; +import throttle from 'common/throttle'; import { Pool } from './interfaces'; -export const seeks = () => xhr.json('/lobby/seeks'); +export const seeks = throttle(2000, () => xhr.json('/lobby/seeks')); export const nowPlaying = () => xhr.json('/account/now-playing').then(o => o.nowPlaying);