Skip to content

Commit 7104257

Browse files
committed
Avoid performing redundant release
1 parent ada52c4 commit 7104257

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Lock.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ export abstract class Lock {
134134
if (this._refreshTimeInterval > 0) {
135135
this._stopRefresh()
136136
}
137-
await this._release()
137+
if (this._acquired) {
138+
await this._release()
139+
}
138140
this._acquired = false
139141
}
140142
}

0 commit comments

Comments
 (0)