diff --git a/lib/sockets/sock.js b/lib/sockets/sock.js index 881c34a..c642fc3 100644 --- a/lib/sockets/sock.js +++ b/lib/sockets/sock.js @@ -277,6 +277,9 @@ Socket.prototype.connect = function(port, host, fn){ debug('%s attempting reconnect', self.type); self.emit('reconnect attempt'); sock.destroy(); + if (typeof port === 'string') { + port = 'unix://' + port; + } self.connect(port, host); self.retry = Math.round(Math.min(max, retry * 1.5)); }, retry);