Refactor: Consider removing usage of setTimeout

Open
#894 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
backend

Research direction

Start by reading the linked pull request 798 commit and locating the setTimeout usage it changes. Trace the related close callback and race-condition behavior, then inspect the existing test setup; the work is done when the timeout usage is removed or its necessity is resolved using the proposed close event without regressing multipart parsing.

Written by the indexing model from the issue text.

Description

Area: files Type: Enhancement
What problem are you trying to solve?

https://github.com/node-formidable/formidable/pull/798/commits/a11190f7e4e40de8f799cece87e56a59dc63164f

Maybe do not use setTimeout

Do you have a new or modified API suggestion to solve the problem?

Use on('close' callback.

Other

Not sure, this is race condition specific, so traditional unit tests don't work

Dominant language
JavaScript
Stars
7.2k
Forks
689
Avg merge
3d 7h
Merged PRs (30d)
2

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.

More from node-formidable/formidable

All issues in node-formidable/formidable

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.