Skip to content

Commit

Permalink
fix(benchmarks): fix timeout errors (#457)
Browse files Browse the repository at this point in the history
The use of `close` event was causing timeouts. Switching to the
`finish` event fixed it.
  • Loading branch information
dnlup committed Oct 10, 2020
1 parent 216b261 commit b1ba471
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions benchmarks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ suite
callback()
}
}))
.on('close', resolve)
.on('finish', resolve)
})
}))).then(() => deferred.resolve())
}
Expand All @@ -72,7 +72,7 @@ suite
callback()
}
}))
.on('close', resolve)
.on('finish', resolve)
}))).then(() => deferred.resolve())
}
})
Expand All @@ -89,7 +89,7 @@ suite
callback()
}
}))
.on('close', resolve)
.on('finish', resolve)
})
}))).then(() => deferred.resolve())
}
Expand Down Expand Up @@ -167,7 +167,7 @@ class SimpleRequest {
write (chunk, encoding, callback) {
callback()
}
}).on('close', resolve)
}).on('finish', resolve)
}

onConnect (abort) {
Expand Down

0 comments on commit b1ba471

Please sign in to comment.