Skip to content

Commit b8600fc

Browse files
authored
fix: finalize peerstore lock after use (#3168)
Removes lock from storage after use
1 parent 8499ef4 commit b8600fc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/peer-store/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@multiformats/multiaddr": "^12.4.0",
5757
"interface-datastore": "^8.3.1",
5858
"it-all": "^3.0.8",
59-
"mortice": "^3.0.6",
59+
"mortice": "^3.2.1",
6060
"multiformats": "^13.3.6",
6161
"protons-runtime": "^5.5.0",
6262
"uint8arraylist": "^2.4.8",

packages/peer-store/src/store.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export class PersistentStore {
105105
lock.refs--
106106

107107
if (lock.refs === 0) {
108+
lock.lock.finalize()
108109
this.locks.delete(peerId)
109110
}
110111
}

0 commit comments

Comments
 (0)