node-restify icon indicating copy to clipboard operation
node-restify copied to clipboard

Node 16 socket issue for Legacy Restify v6

Open avimar opened this issue 3 years ago • 2 comments

  • [ 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. https://github.com/restify/node-restify/commit/e183e5d87435f73baa83024e937a0bcddf807757

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 https://github.com/restify/node-restify/issues/1685 I've not updated restify.

avimar avatar Apr 05 '22 06:04 avimar

We are experiencing this exact same issue and did not upgrade to a newer version due to similar reasons.

aznhassan avatar Oct 17 '22 23:10 aznhassan

This fix is not working for me in node 18. Any other changes that I need to make?

avimar avatar Jan 08 '24 14:01 avimar