Skip to content

Commit

Permalink
fix(ext/http): merge identical if/else branches (#12269)
Browse files Browse the repository at this point in the history
  • Loading branch information
mynane committed Sep 29, 2021
1 parent 4cf7440 commit 62920e4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ext/http/01_http.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,9 @@
// a generic `BadResource` error. Instead store this error and replace
// those with it.
this[connErrorSymbol] = error;
if (error instanceof BadResource) {
return null;
} else if (error instanceof Interrupted) {
return null;
} else if (
if (
error instanceof BadResource ||
error instanceof Interrupted ||
StringPrototypeIncludes(error.message, "connection closed")
) {
return null;
Expand Down

0 comments on commit 62920e4

Please sign in to comment.