Skip to content

Commit

Permalink
Don't send vendor requests when opening a device in DFU mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeuz committed Aug 3, 2023
1 parent c548102 commit bdd9b03
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/device-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ class DeviceBase extends EventEmitter {
}).then(() => {
this._log.trace('Device is open');
this._maxActiveReqs = options.concurrentRequests;
this._resetAllReqs = true; // Reset all requests remaining from a previous session
if (!this._dfu) {
this._resetAllReqs = true; // Reset all requests remaining from a previous session
}
this._state = DeviceState.OPEN;
this.emit('open');
this._process();
Expand Down Expand Up @@ -636,6 +638,7 @@ class DeviceBase extends EventEmitter {
this._state = DeviceState.CLOSED;
this._wantClose = false;
this._maxActiveReqs = null;
this._dfu = null;
this._fwVer = null;
this._id = null;
if (emitEvent) {
Expand Down

0 comments on commit bdd9b03

Please sign in to comment.