summaryrefslogtreecommitdiff
path: root/ext/net/01_net.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/net/01_net.js')
-rw-r--r--ext/net/01_net.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/net/01_net.js b/ext/net/01_net.js
index 517ab127e..536f79bbf 100644
--- a/ext/net/01_net.js
+++ b/ext/net/01_net.js
@@ -531,10 +531,14 @@ const listenOptionApiName = Symbol("listenOptionApiName");
function listen(args) {
switch (args.transport ?? "tcp") {
case "tcp": {
- const { 0: rid, 1: addr } = op_net_listen_tcp({
- hostname: args.hostname ?? "0.0.0.0",
- port: Number(args.port),
- }, args.reusePort);
+ const { 0: rid, 1: addr } = op_net_listen_tcp(
+ {
+ hostname: args.hostname ?? "0.0.0.0",
+ port: Number(args.port),
+ },
+ args.reusePort,
+ args.loadBalanced ?? false,
+ );
addr.transport = "tcp";
return new Listener(rid, addr);
}