Skip to content

Node 16 socket issue for Legacy Restify v6 #1899

@avimar

Description

@avimar
  • [ x ] Searched both open and closed issues for duplicates of this issue
  • [ x ] Title adequately and concisely reflects the feature or the bug

Restify Version: 6.4.0
Node.js Version: 16x

Expected behaviour

HTTP requests to the server should work

Actual behaviour

Requests don't return data

Repro case

Cause

fix: use more reliable close event
The close event from the request object is not guaranteed to fire on the
same order across major versions of Node.js, the more accurate way to
look if the connection was closed is to listen to the event on the
socket. Fixes tests on v16.
e183e5d

Please backport this bugfix to the legacy 6x branch & NPM package.

Yes, 6.x is super old. But due to the major routing change discussed in #1685 I've not updated restify.

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