diff options
author | 2023-01-11 13:58:25 -0800 | |
---|---|---|
committer | 2023-01-11 13:58:25 -0800 | |
commit | 520ecc21ac4d46eb102215f39b5e3565dcf2eef4 (patch) | |
tree | 71600bef1af1142d0ec0781a7f6fd91eeaaf2557 | |
parent | 8911c398d9ed8a7bcb0413128f2db62b355e2adc (diff) | |
download | bun-520ecc21ac4d46eb102215f39b5e3565dcf2eef4.tar.gz bun-520ecc21ac4d46eb102215f39b5e3565dcf2eef4.tar.zst bun-520ecc21ac4d46eb102215f39b5e3565dcf2eef4.zip |
[node:net] Hopefully fix unix sockets
-rw-r--r-- | src/bun.js/net.exports.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bun.js/net.exports.js b/src/bun.js/net.exports.js index 8d283dd1e..11e9ce24b 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; |