Skip to content

Socket errors don't get caught #1

@TheDevMinerTV

Description

@TheDevMinerTV

Description

The Node.js socket errors don't get caught at the moment and there is no way to do so. Node.js will exit the process when a EventEmitter (such as node:net.Socket) emits an event called "error".

Current behaviour

When the code receives a Connection refused, it will exit the process.

Expected behaviour

It throws an error.

Proposal

Add a hook for the "error" socket event and on an error rethrow the error to the caller of lookup().

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions