hypercore 11.10.1 → 11.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/streams.js +3 -1
- package/package.json +1 -1
package/lib/streams.js
CHANGED
|
@@ -9,6 +9,8 @@ class ReadStream extends Readable {
|
|
|
9
9
|
this.end = typeof opts.end === 'number' ? opts.end : -1
|
|
10
10
|
this.snapshot = !opts.live && opts.snapshot !== false
|
|
11
11
|
this.live = this.end === -1 ? !!opts.live : false
|
|
12
|
+
this.wait = typeof opts.wait === 'boolean' ? opts.wait : this.core.wait
|
|
13
|
+
this.timeout = opts.timeout || core.timeout
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
_open (cb) {
|
|
@@ -32,7 +34,7 @@ class ReadStream extends Readable {
|
|
|
32
34
|
return
|
|
33
35
|
}
|
|
34
36
|
|
|
35
|
-
this.push(await this.core.get(this.start
|
|
37
|
+
this.push(await this.core.get(this.start++, { wait: this.wait, timeout: this.timeout }))
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
|