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

import Node's setTimeout & clearTimeout to prevent ambiguity #632

Merged
merged 2 commits into from Dec 14, 2021

Conversation

JeffWinder
Copy link
Contributor

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behaviour

setTimeout in lib/socket.ts can lead to error this.pingIntervalTimer.refresh is not a function because interpreter might see it as the javascript version, which doesn't have a refresh() function.

New behaviour

Importing setTimeout and clearTimout from Node's timers module explicitly doesn't result in the error anymore.

Other information (e.g. related issues)

Solves the bug in this issue: #631
The refresh() call was added here #628

@darrachequesne darrachequesne merged commit b04967b into socketio:master Dec 14, 2021
@darrachequesne
Copy link
Member

@JeffWinder thanks!

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.

None yet

2 participants