Increase successful connection timeout
This commit is contained in:
parent
2dc53e0820
commit
6b1b51eacd
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ class Client extends EventEmitter {
|
||||||
if (this.options.session) {
|
if (this.options.session) {
|
||||||
// Check if session restore was successfull
|
// Check if session restore was successfull
|
||||||
try {
|
try {
|
||||||
await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: 5000 });
|
await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: 15000 });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.name === 'TimeoutError') {
|
if (err.name === 'TimeoutError') {
|
||||||
this.emit(Events.AUTHENTICATION_FAILURE, 'Unable to log in. Are the session details valid?');
|
this.emit(Events.AUTHENTICATION_FAILURE, 'Unable to log in. Are the session details valid?');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue