Skip to content

Commit e425930

Browse files
committed
Simplify
1 parent 55572be commit e425930

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/replicator.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1242,8 +1242,7 @@ module.exports = class Replicator {
12421242
this.downloading = false
12431243
this.activeSessions = 0
12441244

1245-
this.peerOpts = {}
1246-
if (inflightRange) this.peerOpts.inflightRange = inflightRange
1245+
this.inflightRange = inflightRange
12471246

12481247
this._attached = new Set()
12491248
this._inflight = new InflightTracker()
@@ -2094,7 +2093,8 @@ module.exports = class Replicator {
20942093

20952094
if (channel === null) return onnochannel()
20962095

2097-
const peer = new Peer(replicator, protomux, channel, session, this.peerOpts)
2096+
const opts = { inflightRange: this.inflightRange }
2097+
const peer = new Peer(replicator, protomux, channel, session, opts)
20982098
const stream = protomux.stream
20992099

21002100
peer.channel.open({

0 commit comments

Comments
 (0)