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

Hub.IsEnabled set to false when Hub disposed #1021

Merged
merged 6 commits into from
Jun 3, 2021
Merged

Hub.IsEnabled set to false when Hub disposed #1021

merged 6 commits into from
Jun 3, 2021

Conversation

semuserable
Copy link
Contributor

@semuserable semuserable commented May 31, 2021

Hub.IsEnabled is set to false when Hub.Dispose() is called. Related to getsentry/sentry-unity#193 bug.

src/Sentry/Internal/Hub.cs Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented May 31, 2021

Codecov Report

Merging #1021 (71a011e) into main (92dd408) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1021   +/-   ##
=======================================
  Coverage   81.42%   81.43%           
=======================================
  Files         190      190           
  Lines        5964     5967    +3     
  Branches     1468     1469    +1     
=======================================
+ Hits         4856     4859    +3     
  Misses        685      685           
  Partials      423      423           
Impacted Files Coverage Δ
src/Sentry/Internal/Hub.cs 66.08% <100.00%> (+0.90%) ⬆️

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 92dd408...71a011e. Read the comment docs.

@bruno-garcia
Copy link
Member

Also, could you please add a test to validate that it in fact changes from true to false once u dispose?

@semuserable
Copy link
Contributor Author

semuserable commented Jun 2, 2021

Updated. Interlocked moved up + if; Unit test added.

@bruno-garcia I added a test with InlineData to potentially check "over-disposing". I'm not sure it's needed for now, but still.

@semuserable
Copy link
Contributor Author

semuserable commented Jun 3, 2021

Updated. Please, re-run CI flow.

cc @bruno-garcia @Tyrrrz

@bruno-garcia bruno-garcia enabled auto-merge (squash) June 3, 2021 12:40
@bruno-garcia bruno-garcia enabled auto-merge (squash) June 3, 2021 15:37
@bruno-garcia bruno-garcia merged commit 29d301a into getsentry:main Jun 3, 2021
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