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:
parent
28bba4952b
commit
34171eab8c
2 changed files with 14 additions and 33 deletions
|
@ -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 = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue