doing wait for /sync request to receive message, doesn't work well

just poll every 200ms, feels way faster as before
we were probably missing /sync requests
This commit is contained in:
Bruno Windels 2019-04-02 15:13:04 +02:00
parent 28bba4952b
commit 34171eab8c
2 changed files with 14 additions and 33 deletions

View file

@ -161,15 +161,6 @@ module.exports = class RiotSession {
});
}
waitForSyncResponseWith(predicate) {
return this.page.waitForResponse(async (response) => {
if (response.request().url().indexOf("/sync") === -1) {
return false;
}
return predicate(response);
});
}
/** wait for a /sync request started after this call that gets a 200 response */
async waitForNextSuccessfulSync() {
const syncUrls = [];