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'; }