Skip to content

Commit

Permalink
fix: allow to use unix sockets in connect (#1852)
Browse files Browse the repository at this point in the history
Fixes #1040
  • Loading branch information
robertsLando authored Apr 26, 2024
1 parent f62e207 commit 22c97b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/connect/tcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const buildStream: StreamBuilder = (client, opts) => {
opts.port = opts.port || 1883
opts.hostname = opts.hostname || opts.host || 'localhost'

const { port } = opts
const { port, path } = opts
const host = opts.hostname

debug('port %d and host %s', port, host)
return net.createConnection(port, host)
return net.createConnection({ port, host, path })
}

export default buildStream

0 comments on commit 22c97b5

Please sign in to comment.