Skip to content

Commit

Permalink
fix: remove OTA firmware update lock, allow parallel fw updates
Browse files Browse the repository at this point in the history
Ref #3936
  • Loading branch information
robertsLando committed Oct 17, 2024
1 parent 6420ee4 commit f929686
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions api/lib/ZwaveClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,6 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
private pollIntervals: Record<string, NodeJS.Timeout>

private _lockNeighborsRefresh: boolean
private _lockOTWUpdates: boolean
private _lockGetSchedule: boolean
private _cancelGetSchedule: boolean

Expand Down Expand Up @@ -3837,11 +3836,6 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
async firmwareUpdateOTW(
file: FwFile,
): Promise<ControllerFirmwareUpdateResult> {
if (this._lockOTWUpdates) {
throw Error('Firmware update already in progress')
}

this._lockOTWUpdates = true
try {
if (backupManager.backupOnEvent) {
this.nvmEvent = 'before_controller_fw_update_otw'
Expand All @@ -3860,10 +3854,8 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
const result = await this.driver.controller.firmwareUpdateOTW(
firmware.data,
)
this._lockOTWUpdates = false
return result
} catch (e) {
this._lockOTWUpdates = false
throw Error(`Error while updating firmware: ${e.message}`)
}
}
Expand Down

0 comments on commit f929686

Please sign in to comment.