Skip to content

Auto-port calling listen callback N times where N is the amount of port attempts #1

@Marak

Description

@Marak

There is an issue with the auto-port functionality which causes the callback handler for http.listen to be called N times, where N is the attempts at auto-porting.

The core issue is that either Node itself or Express won't pass EADDRINUSE errors through the normal error object in listen callback. The only way to catch this error is to listen for server.on("error").

Work around requires minor refactor of auto-port logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions