Skip to content

Commit

Permalink
prevent AggregateException when connecting to unity process (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesWu authored Apr 26, 2023
1 parent a0535a3 commit f676174
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,9 @@ void StartCore(DebugProgramOptions options) {
catch (SocketException sex) when (sex.SocketErrorCode == SocketError.ConnectionRefused) {
// Retry it in case it takes a while for mono.exe to initialize or if it hasn't started yet
}
catch (AggregateException aex) when (aex.InnerExceptions.Count == 1 && aex.InnerExceptions[0] is SocketException {SocketErrorCode: SocketError.ConnectionRefused}) {
// Retry it in case it takes a while
}
Thread.Sleep(100);
}

Expand Down

0 comments on commit f676174

Please sign in to comment.