Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

net::Server.unref() failed on cluster mode #73

@kyriosli

Description

@kyriosli

This can be easily reproduced by the following code:

var cluster = require('cluster');
if (cluster.isMaster) {
    cluster.fork();
}
else {
    require('net').createServer().listen(8081, function () {
        this.unref();
    })
}

In node v0.12.7 it says:

net.js:1440
    this._handle.unref();
                 ^
TypeError: undefined is not a function
    at Server.unref (net.js:1440:18)
    at Server.<anonymous> (/home/kyrios.li/test.js:7:8)
    at Server.g (events.js:199:16)
    at Server.emit (events.js:129:20)
    at net.js:1171:12
    at process._tickCallback (node.js:355:11)

and the same code is ok when NODE_CLUSTER_SCHED_POLICY is set to none. So I thought maybe it is a problem with RoundRobin?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions