Skip to content

Commit

Permalink
feat: disable offline caching on unknown platforms (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind authored May 31, 2022
1 parent c896026 commit 2366267
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Collect context information synchronously during init to capture it for very early events ([#744](https://github.com/getsentry/sentry-unity/pull/744))
- Automatic user IDs on native crashes & .NET events ([#728](https://github.com/getsentry/sentry-unity/pull/728))
- Use single-threaded HTTP transport on unknown platforms ([#756](https://github.com/getsentry/sentry-unity/pull/756))
- Disable offline caching on unknown platforms ([#770](https://github.com/getsentry/sentry-unity/pull/770))

## 0.16.0

Expand Down
10 changes: 9 additions & 1 deletion src/Sentry.Unity/Default/UnknownPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ public static void Configure(SentryUnityOptions options)
if (options.BackgroundWorker is null)
{
options.DiagnosticLogger?.Log(SentryLevel.Debug,
"Configuring on an unknown platform. Using WebBackgroundWorker to improve compatibility.");
"Platform support for background thread execution is unknown: using WebBackgroundWorker.");
options.BackgroundWorker = new WebBackgroundWorker(options, SentryMonoBehaviour.Instance);
}

options.DefaultUserId = AnalyticsSessionInfo.userId;

if (options.CacheDirectoryPath is not null)
{
options.DiagnosticLogger?.Log(SentryLevel.Debug,
"Platform support for offline caching is unknown - disabling it.");
options.CacheDirectoryPath = null;
}
}
}
}

0 comments on commit 2366267

Please sign in to comment.