summaryrefslogtreecommitdiff
path: root/ext/http/01_http.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-04-04 16:17:36 +0200
committerGitHub <noreply@github.com>2023-04-04 14:17:36 +0000
commitc4628aa8090f2ec1a5a7616a987c653d0bfd6341 (patch)
tree82b8b6026c04b5ba1152beb0a22ccd6353f408f8 /ext/http/01_http.js
parenta1764f7690cfdc3e42724fcad29ef954b7e576a4 (diff)
refactor(ext/http): bring back 'reusePort' option for 'Deno.serve()' (#18590)
Closes https://github.com/denoland/deno/issues/18582
Diffstat (limited to 'ext/http/01_http.js')
-rw-r--r--ext/http/01_http.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/http/01_http.js b/ext/http/01_http.js
index f434acd3c..d0aefc0c3 100644
--- a/ext/http/01_http.js
+++ b/ext/http/01_http.js
@@ -657,7 +657,7 @@ async function serve(arg1, arg2) {
const listenOpts = {
hostname: options.hostname ?? "127.0.0.1",
port: options.port ?? 9000,
- reuseport: options.reusePort ?? false,
+ reusePort: options.reusePort ?? false,
};
if (options.cert || options.key) {
@@ -677,11 +677,13 @@ async function serve(arg1, arg2) {
port: listenOpts.port,
cert: listenOpts.cert,
key: listenOpts.key,
+ reusePort: listenOpts.reusePort,
});
} else {
listener = listen({
hostname: listenOpts.hostname,
port: listenOpts.port,
+ reusePort: listenOpts.reusePort,
});
}