node icon indicating copy to clipboard operation
node copied to clipboard

Reduce likelihood of race conditions on keep-alive timeout calculatio…

Open zanettea opened this issue 10 months ago • 5 comments

Added 1 seconds threshold in keepalive timeout client-side Added 1 second threshold in keepalive timeout server-side (expire the socket timeout 1 sec after the announced timeout)

Probably better to use a configurable threshold like in undici keepAliveTimeoutThreshold (https://github.com/nodejs/undici/pull/291)

zanettea avatar Apr 23 '24 10:04 zanettea

Review requested:

  • [ ] @nodejs/http
  • [ ] @nodejs/net

nodejs-github-bot avatar Apr 23 '24 10:04 nodejs-github-bot

ping @mweberxyz

mcollina avatar Apr 23 '24 10:04 mcollina

CI: https://ci.nodejs.org/job/node-test-pull-request/58633/

nodejs-github-bot avatar Apr 23 '24 10:04 nodejs-github-bot

The commit message and PR title contain a typo

meyfa avatar Apr 24 '24 09:04 meyfa

Found the same issue in dotnet -- they went with a 1 second offset as well, so that was a good choice. 👍

mweberxyz avatar Apr 24 '24 13:04 mweberxyz

Hey, this valuable PR fixes many similar issues for keep-alive. Is it possible to push this through 👀

jazelly avatar Aug 28 '24 11:08 jazelly

CI: https://ci.nodejs.org/job/node-test-pull-request/61582/

nodejs-github-bot avatar Aug 28 '24 11:08 nodejs-github-bot

Hi, I'd like to help this land to resovle similar issues. Can I continue the work and add @zanettea as a co-author? To me, there are just test cases to be added ~and some commits to be rebased to dodge the flakiness on CI~.

jazelly avatar Sep 07 '24 12:09 jazelly

The new PR was just merged. This one can be closed now. (Thanks to @jazelly, @zanettea and everyone else who worked on it!)

nikwen avatar Sep 13 '24 16:09 nikwen