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 bound emitters leaking when trying to remove all listeners #1260

Merged
merged 1 commit into from
Mar 8, 2021

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Mar 5, 2021

What does this PR do?

Fix bound emitters leaking when trying to remove all listeners.

Motivation

The latest version of Axios bumped the version of their follow-redirects dependency which includes follow-redirects/follow-redirects@ad15f9b which relies on removing all event listeners from the underlying request. This caused the tracer to start crashing when used with Axios because the scope manager didn't properly handle calls to removeAllListeners without an actual event name, so all listeners were still attached to the emitter.

Fixes #1253

@rochdev rochdev added bug Something isn't working core labels Mar 5, 2021
@rochdev rochdev added this to the 0.31.1 milestone Mar 5, 2021
@rochdev rochdev requested a review from a team as a code owner March 5, 2021 21:42
@codecov
Copy link

codecov bot commented Mar 5, 2021

Codecov Report

Merging #1260 (d055bb8) into master (a431ac2) will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1260      +/-   ##
==========================================
+ Coverage   92.50%   92.59%   +0.08%     
==========================================
  Files         149      149              
  Lines        6074     6074              
==========================================
+ Hits         5619     5624       +5     
+ Misses        455      450       -5     
Impacted Files Coverage Δ
packages/dd-trace/src/scope/base.js 84.04% <100.00%> (+5.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a431ac2...d055bb8. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash with Error: socket hang up
2 participants