Skip to content

Commit 211b40f

Browse files
committed
minor changes
1 parent 87629aa commit 211b40f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

bench.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function benchRead () {
3939
if (err) throw err
4040
if (offset >= 512 * 1024 * 1024) {
4141
console.timeEnd('512mb read')
42-
console.log('### EXIT')
42+
console.log('BROWSER_RUNNER_EXIT')
4343
return
4444
}
4545
st.read(offset += buf.length, 65536, onread)

browser-runner.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async function runTests (ev) {
3232

3333
page.on('console', msg => {
3434
msg = msg.text()
35-
if (msg.includes('### EXIT')) {
35+
if (msg.includes('BROWSER_RUNNER_EXIT')) {
3636
shutdown()
3737
} else {
3838
results.push(`${msg}\n`)

index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,12 @@ ReadRequest.prototype.onread = function (err, buf) {
246246
const req = this.req
247247

248248
if (err && this.retry) {
249+
if (err.name === 'NotReadableError') {
250+
this.file.clearFile()
251+
this.run(req)
252+
return
253+
}
254+
249255
this.retry = false
250256
if (this.lock(this)) {
251257
this.file.clearFile()
@@ -254,12 +260,6 @@ ReadRequest.prototype.onread = function (err, buf) {
254260
return
255261
}
256262

257-
if (err && err.name === 'NotReadableError') {
258-
this.file.clearFile()
259-
this.run(req)
260-
return
261-
}
262-
263263
this.req = null
264264
this.pool.push(this)
265265
this.retry = true

0 commit comments

Comments
 (0)