node-hash-ring icon indicating copy to clipboard operation
node-hash-ring copied to clipboard

Segmentation fault if all weights are set to 0

Open j03m opened this issue 14 years ago • 0 comments

Run this code:

var HashRing = require('hash_ring'); var obj = {}; obj["A"] = 0; obj["B"] = 0; obj["C"] = 0; var ring = new HashRing(obj); var instance = ring.getNode("hi to the world"); console.log(instance);

The result will be:

node hashRingTest.js Segmentation fault

Easily rectified by changing all of the "0"'s to "1"'s but tough to determine the cause. Figured I'd post.

j03m avatar Jul 23 '11 02:07 j03m