Skip to content

net.listen does not emit 'listening' event when in --eval mode #1600

Closed
@rmg

Description

@rmg

Failing unit test submitted as PR #1581

I found this when trying to confirm the format of the address object. The following hangs on most releases of node higher than 0.10.38:

node -e "require('net').createServer().listen(0, function() { console.log(this.address()); this.close(); });"

It seems that Server does not emit a listen event when no address is specified and is called in eval mode.

I don't fully understand how the regression was introduced, but git bisect seemed pretty confident that it was in 5b636fe.

/to @trevnorris for the indicated commit
/cc @piscisaureus @sam-github @brendanashworth

Metadata

Metadata

Assignees

Labels

confirmed-bugIssues with confirmed bugs.netIssues and PRs related to the net subsystem.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions