1
0
Fork 0
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:
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 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,