Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: undici connect timeout (#302) #303

Merged
merged 4 commits into from
Mar 17, 2023
Merged

fix: undici connect timeout (#302) #303

merged 4 commits into from
Mar 17, 2023

Conversation

joelnet
Copy link
Contributor

@joelnet joelnet commented Mar 15, 2023

Checklist

Comments

  • test/disable-request-logging.test.js was failing prior to any new work. This test made to pass by changing t.plan(10) to t.plan(9). I do not know the larger impact of this change.
  • overriding net.connect to force a timeout was taken from undici's test/connect-timeout.js.
  • a new ConnectTimeoutError error object was created to handle this error.
  • 500 status error was used because this is what undici uses.
  • I could not figure out how to get the FakeTimers working for this test. There is a 50ms connectTimeout that waits in real time.
  • This is my first contribution to this project and I am not familiar with this codebase so please triple check my work.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Fdawgs
Copy link
Member

Fdawgs commented Mar 16, 2023

I'm just here for the cat. Oh, and the CI is failing 🙃

@Uzlopak
Copy link
Contributor

Uzlopak commented Mar 16, 2023

@Fdawgs
PTAL

Created a corresponding issue #304 regarding the unit test.

@mcollina mcollina merged commit 1b10508 into fastify:master Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants