Skip to content

Failed "connect" call does not close socket #513

Closed
@rumata28

Description

@rumata28

I am developing integration tests and have problems with negative case testing - my test app never exits.

Steps to Reproduce:

  • Call connect to vhost, for which user does not have permissions
  • See that err callback is called
  • See that NodeJS app just hangs, never exits.

I found that reason is that the following block is only called on timeout:

        sock.end();
        sock.destroy();

And it is never called on other connection errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions