From 520ecc21ac4d46eb102215f39b5e3565dcf2eef4 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Wed, 11 Jan 2023 13:58:25 -0800 Subject: [PATCH] [node:net] Hopefully fix unix sockets --- src/bun.js/net.exports.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bun.js/net.exports.js b/src/bun.js/net.exports.js index 8d283dd1e3..11e9ce24b7 100644 --- a/src/bun.js/net.exports.js +++ b/src/bun.js/net.exports.js @@ -197,7 +197,10 @@ export const Socket = (function (InternalSocket) { connect(port, host, connectListener) { // TODO support IPC sockets var path; - if (typeof host == "function") { + if (arguments.length === 1 && typeof port === "string") { + path = port; + port = undefined; + } else if (typeof host == "function") { if (typeof port === "string") { path = port; port = undefined;