Skip to content

Segmentation fault if all weights are set to 0 #5

@j03m

Description

@j03m

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions