Skip to content

Commit

Permalink
fix: won't logout if build fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Misaka-L committed Oct 26, 2024
1 parent 3eb78a2 commit 2b4a8d8
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,21 @@ public static void ExitWithException(Exception e)
Debug.LogError("Failed to preform auto build:\n" + e);
Debug.LogException(e);

EditorApplication.Exit(1);
Exit();
}

[PublicAPI]
public static void Exit()
public static async void Exit()
{
if (_logOutWhenExit)
{
Debug.Log("Logging out");

APIUser.Logout();
ApiCredentials.Clear();

// Wait for http request to finish
await Task.Delay(5000);

ApiCredentials.Clear();
Debug.Log("Logged out");
}

Expand Down

0 comments on commit 2b4a8d8

Please sign in to comment.