Skip to content

Commit aadf419

Browse files
committed
Use async void for InitializeSentrySdk
1 parent 7806580 commit aadf419

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

CollapseLauncher/Program.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,18 @@ private static void InitCriticalModules()
291291
VelopackLocatorExtension.StartUpdaterHook(AppAumid);
292292
return;
293293

294-
static void InitializeSentrySdk()
294+
static async void InitializeSentrySdk()
295295
{
296296
try
297297
{
298-
// Sentry SDK Entry
299-
LogWriteLine("[SentrySDKInit] Loading Sentry SDK asynchronously...", LogType.Sentry, true);
300-
SentryHelper.InitializeSentrySdk();
301-
LogWriteLine("[SentrySDKInit] Setting up global exception handler redirection", LogType.Sentry, true);
302-
SentryHelper.InitializeExceptionRedirect();
298+
await Task.Run(() =>
299+
{
300+
// Sentry SDK Entry
301+
LogWriteLine("[SentrySDKInit] Loading Sentry SDK asynchronously...", LogType.Sentry, true);
302+
SentryHelper.InitializeSentrySdk();
303+
LogWriteLine("[SentrySDKInit] Setting up global exception handler redirection", LogType.Sentry, true);
304+
SentryHelper.InitializeExceptionRedirect();
305+
});
303306
}
304307
catch (Exception ex)
305308
{

0 commit comments

Comments
 (0)