1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-05 22:09:02 -05:00

fix(ext/http): merge identical if/else branches (#12269)

This commit is contained in:
mynane 2021-09-30 02:55:10 +08:00 committed by Ryan Dahl
parent 91f9931bb5
commit dbf2f5ff10

View file

@ -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;