Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
benchmark: fix async-resource benchmark
In the benchmark, because it performs asynchronous operations before writing its HTTP replies, the underlying socket can be closed by the peer before the response is written. Since 28e6626, that means that attempting to `.end()` the HTTP response results in an uncaught exception, breaking the benchmark. Fix that by checking whether the response object has been destroyed or not before attempting to call `.end()`. #33591 PR-URL: #33642 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
- Loading branch information