From c48a1c17223caf6336ec59a401474fd31cf9073f Mon Sep 17 00:00:00 2001 From: Chandra Nakka Date: Sat, 26 May 2018 21:39:43 +0530 Subject: [PATCH] Don't append port for unix socket --- lib/memcached.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/memcached.js b/lib/memcached.js index 761b299..5d045e4 100644 --- a/lib/memcached.js +++ b/lib/memcached.js @@ -124,7 +124,7 @@ Client.config = { // will receive the connection if the operation was successful memcached.connect = function connect(server, callback) { // Default port to 11211 - if(!server.match(/(.+):(\d+)$/)) { + if (!server.match(/(.+):(\d+)$/) && !server.match(/\/memcached\.sock$/i)) { server = server + ':11211'; }