Loading lib/fastboot.js +4 −6 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ export class FastbootDevice { * * @private */ async _validateAndConnectDevice(rethrowErrors) { async _validateAndConnectDevice() { // Validate device let ife = this.device.configurations[0].interfaces[0].alternates[0]; if (ife.endpoints.length !== 2) { Loading Loading @@ -123,10 +123,8 @@ export class FastbootDevice { this._connectReject = null; } if (rethrowErrors) { throw error; } } // Return from waitForConnect() if (this._connectResolve !== null) { Loading Loading @@ -227,7 +225,7 @@ export class FastbootDevice { // Check whether waitForConnect() is pending and save it for later let hasPromiseReject = this._connectReject !== null; try { await this._validateAndConnectDevice(false); await this._validateAndConnectDevice(); } catch (error) { // Only rethrow errors from the event handler if waitForConnect() // didn't already handle them Loading @@ -240,7 +238,7 @@ export class FastbootDevice { this._registeredUsbListeners = true; } await this._validateAndConnectDevice(true); await this._validateAndConnectDevice(); } /** Loading Loading
lib/fastboot.js +4 −6 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ export class FastbootDevice { * * @private */ async _validateAndConnectDevice(rethrowErrors) { async _validateAndConnectDevice() { // Validate device let ife = this.device.configurations[0].interfaces[0].alternates[0]; if (ife.endpoints.length !== 2) { Loading Loading @@ -123,10 +123,8 @@ export class FastbootDevice { this._connectReject = null; } if (rethrowErrors) { throw error; } } // Return from waitForConnect() if (this._connectResolve !== null) { Loading Loading @@ -227,7 +225,7 @@ export class FastbootDevice { // Check whether waitForConnect() is pending and save it for later let hasPromiseReject = this._connectReject !== null; try { await this._validateAndConnectDevice(false); await this._validateAndConnectDevice(); } catch (error) { // Only rethrow errors from the event handler if waitForConnect() // didn't already handle them Loading @@ -240,7 +238,7 @@ export class FastbootDevice { this._registeredUsbListeners = true; } await this._validateAndConnectDevice(true); await this._validateAndConnectDevice(); } /** Loading