1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-30 16:40:57 -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:
Yoshiya Hinosawa 2024-11-14 19:15:25 +09:00
parent ce620cecbb
commit 86c32caccc
No known key found for this signature in database
GPG key ID: 9017DB4559488785

View file

@ -470,7 +470,6 @@ Deno.test("[node/http] send request with non-chunked body", async () => {
};
const abortController = new AbortController();
const servePromise = Deno.serve({
hostname,
port,
signal: abortController.signal,
onListen: undefined,
@ -498,6 +497,8 @@ Deno.test("[node/http] send request with non-chunked body", async () => {
req.on("socket", (socket) => {
assert(socket.writable);
assert(socket.readable);
socket.setKeepAlive();
socket.setTimeout(100);
});
req.write("hello ");
req.write("world");
@ -525,7 +526,6 @@ Deno.test("[node/http] send request with chunked body", async () => {
};
const abortController = new AbortController();
const servePromise = Deno.serve({
hostname,
port,
signal: abortController.signal,
onListen: undefined,
@ -572,7 +572,6 @@ Deno.test("[node/http] send request with chunked body as default", async () => {
};
const abortController = new AbortController();
const servePromise = Deno.serve({
hostname,
port,
signal: abortController.signal,
onListen: undefined,