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

Avoid repeat initialization #130

Merged
merged 6 commits into from Nov 9, 2022
Merged

Conversation

mattjohnsonpint
Copy link
Contributor

Fixes #129 by automatically preventing multiple initialization. Writes a message to stderr accordingly.

Will continue pursuing a fix for the root cause in getsentry/sentry-dotnet#2033.

@mattjohnsonpint
Copy link
Contributor Author

@lucas-zimerman - Please let me know if you think there's a better place to write the error message at this stage. Thanks.

@lucas-zimerman
Copy link
Collaborator

lucas-zimerman commented Nov 9, 2022

Console error is ok,l it'll end up showing on logcat or on the IDE Logger.
My only concern on using the SentrySdk.IsEnabled check is if we should clear the past data (breadcrumbs, context, tags)
EDIT: Other than that the PR looks good for me.

mattjohnsonpint and others added 3 commits November 8, 2022 17:37
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
@mattjohnsonpint mattjohnsonpint merged commit d57e615 into main Nov 9, 2022
@mattjohnsonpint mattjohnsonpint deleted the avoid-multiple-init-calls branch November 9, 2022 02:24
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.

Unhandled Exception : System.IO.IOException: Sharing violation on path ..../Sentry/xxxxx.envelope
2 participants