Skip to content

Commit

Permalink
[FIX] if unable to resolve (as in the case of dns managed by docker c…
Browse files Browse the repository at this point in the history
…ompose,etc) - simply return the same listen we were given (#206)
  • Loading branch information
aricart authored Oct 11, 2021
1 parent d5bce3c commit 2758ff7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/deno_transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,8 @@ export async function denoResolveHost(s: string): Promise<string[]> {
if (w[1].status === "fulfilled") {
ips.push(...w[1].value);
}

if (ips.length === 0 && w[0].status === "rejected") {
throw w[0].reason;
}
if (ips.length === 0 && w[1].status === "rejected") {
throw w[1].reason;
if (ips.length === 0) {
ips.push(s);
}
return ips;
}

0 comments on commit 2758ff7

Please sign in to comment.