mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-22 05:20:09 +00:00
Increase successful connection timeout
This commit is contained in:
@@ -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?');
|
||||||
|
|||||||
Reference in New Issue
Block a user