restify / restify/node-restify

Node 16 socket issue for Legacy Restify v6

Open
#1,899 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.7k
Forks
975
Avg merge
1d 6h
Merged PRs (30d)
5

Description

  • [ 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the referenced commit e183e5d87435f73baa83024e937a0bcddf807757 and its corresponding code on the legacy 6.x branch. Confirm the change fixes HTTP requests that fail to return data under Node.js 16, then verify the relevant tests pass and the fix is suitable for the legacy 6.x package.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.