Fix Auth Timeout Error (#5666)
* Fix Auth Timeout Error * fixing Auth Timeout Error
This commit is contained in:
parent
376c60668c
commit
143662eae2
1 changed files with 2 additions and 4 deletions
|
|
@ -96,8 +96,7 @@ class Client extends EventEmitter {
|
||||||
* Private function
|
* Private function
|
||||||
*/
|
*/
|
||||||
async inject() {
|
async inject() {
|
||||||
|
if(this.options.authTimeoutMs === undefined || this.options.authTimeoutMs==0){
|
||||||
if(this.options.authTimeoutMs === undefined){
|
|
||||||
this.options.authTimeoutMs = 30000;
|
this.options.authTimeoutMs = 30000;
|
||||||
}
|
}
|
||||||
let start = Date.now();
|
let start = Date.now();
|
||||||
|
|
@ -111,7 +110,6 @@ class Client extends EventEmitter {
|
||||||
if(!res){
|
if(!res){
|
||||||
throw 'auth timeout';
|
throw 'auth timeout';
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.setDeviceName(this.options.deviceName, this.options.browserName);
|
await this.setDeviceName(this.options.deviceName, this.options.browserName);
|
||||||
const pairWithPhoneNumber = this.options.pairWithPhoneNumber;
|
const pairWithPhoneNumber = this.options.pairWithPhoneNumber;
|
||||||
const version = await this.getWWebVersion();
|
const version = await this.getWWebVersion();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue