Increase successful connection timeout

This commit is contained in:
Pedro Lopez
2020-01-17 22:06:04 -04:00
parent 2dc53e0820
commit 6b1b51eacd

View File

@@ -51,7 +51,7 @@ class Client extends EventEmitter {
if (this.options.session) {
// Check if session restore was successfull
try {
await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: 5000 });
await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: 15000 });
} catch (err) {
if (err.name === 'TimeoutError') {
this.emit(Events.AUTHENTICATION_FAILURE, 'Unable to log in. Are the session details valid?');