Skip to content

Commit

Permalink
Improve libmemcached compatibility.
Browse files Browse the repository at this point in the history
When using ketama compatibility, utilise the `default_port` option from 3rd-Eden/node-hashring#23
  • Loading branch information
rcoup committed Sep 22, 2014
1 parent d5e944f commit 0b11411
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/memcached.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ function Client (args, options) {
Utils.merge(this, options);

this.servers = servers;
var compatibility = this.compatibility || this.compatiblity;
this.HashRing = new HashRing(args, this.algorithm, {
compatibility: this.compatibility || this.compatiblity
compatibility: compatibility,
default_port: (compatibility == 'ketama') ? 11211 : null
});
this.connections = {};
this.issues = [];
Expand Down

0 comments on commit 0b11411

Please sign in to comment.