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(NODE-4281): ensure that the driver always uses Node.js timers #3275

Merged
merged 2 commits into from
Jun 1, 2022

Commits on Jun 1, 2022

  1. fix(NODE-4281): ensure that the driver always uses Node.js timers

    Ensure that the driver always uses the Node.js timers API, rather
    than the global one, in case they diverge. This affects Compass,
    where the `setTimeout(...).unref()` usage currently results in
    uncaught exceptions because `setTimeout()` returns a number in
    browsers.
    
    This change adds `import ... from 'timers';` where necessary and
    adds a linter rule to prevent regressions. If this is not
    an acceptable solution, we can go back to the drawing board,
    but this seems like a good solution that doesn’t add too much
    overhead when writing driver code.
    addaleax committed Jun 1, 2022
    Configuration menu
    Copy the full SHA
    15ef46e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a4dd3da View commit details
    Browse the repository at this point in the history