mirror of
https://github.com/denoland/deno.git
synced 2024-12-11 01:58:05 -05:00
use default bind address (0.0.0.0) for Deno.serve
If hostname specified to localhost on Deno.serve, it seems listening on ::1, which causes problem on windows.
This commit is contained in:
parent
ce620cecbb
commit
86c32caccc
1 changed files with 2 additions and 3 deletions
|
@ -470,7 +470,6 @@ Deno.test("[node/http] send request with non-chunked body", async () => {
|
||||||
};
|
};
|
||||||
const abortController = new AbortController();
|
const abortController = new AbortController();
|
||||||
const servePromise = Deno.serve({
|
const servePromise = Deno.serve({
|
||||||
hostname,
|
|
||||||
port,
|
port,
|
||||||
signal: abortController.signal,
|
signal: abortController.signal,
|
||||||
onListen: undefined,
|
onListen: undefined,
|
||||||
|
@ -498,6 +497,8 @@ Deno.test("[node/http] send request with non-chunked body", async () => {
|
||||||
req.on("socket", (socket) => {
|
req.on("socket", (socket) => {
|
||||||
assert(socket.writable);
|
assert(socket.writable);
|
||||||
assert(socket.readable);
|
assert(socket.readable);
|
||||||
|
socket.setKeepAlive();
|
||||||
|
socket.setTimeout(100);
|
||||||
});
|
});
|
||||||
req.write("hello ");
|
req.write("hello ");
|
||||||
req.write("world");
|
req.write("world");
|
||||||
|
@ -525,7 +526,6 @@ Deno.test("[node/http] send request with chunked body", async () => {
|
||||||
};
|
};
|
||||||
const abortController = new AbortController();
|
const abortController = new AbortController();
|
||||||
const servePromise = Deno.serve({
|
const servePromise = Deno.serve({
|
||||||
hostname,
|
|
||||||
port,
|
port,
|
||||||
signal: abortController.signal,
|
signal: abortController.signal,
|
||||||
onListen: undefined,
|
onListen: undefined,
|
||||||
|
@ -572,7 +572,6 @@ Deno.test("[node/http] send request with chunked body as default", async () => {
|
||||||
};
|
};
|
||||||
const abortController = new AbortController();
|
const abortController = new AbortController();
|
||||||
const servePromise = Deno.serve({
|
const servePromise = Deno.serve({
|
||||||
hostname,
|
|
||||||
port,
|
port,
|
||||||
signal: abortController.signal,
|
signal: abortController.signal,
|
||||||
onListen: undefined,
|
onListen: undefined,
|
||||||
|
|
Loading…
Reference in a new issue