Skip to content

Commit

Permalink
only aquire exclusive lock on writable sessions (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh authored Feb 19, 2025
1 parent 9ad2502 commit a87d9be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ class Hypercore extends EventEmitter {
this._setupSession(parent)
}

if (opts.exclusive) {
if (opts.exclusive && opts.writable !== false) {
this.exclusive = true
await this.core.lockExclusive()
}
Expand Down

0 comments on commit a87d9be

Please sign in to comment.