diff --git a/Extensions/dnSpy.Debugger/dnSpy.Debugger.DotNet.Mono/Impl/DbgEngineImpl.cs b/Extensions/dnSpy.Debugger/dnSpy.Debugger.DotNet.Mono/Impl/DbgEngineImpl.cs index 6a53695a45..2b707fdcd0 100644 --- a/Extensions/dnSpy.Debugger/dnSpy.Debugger.DotNet.Mono/Impl/DbgEngineImpl.cs +++ b/Extensions/dnSpy.Debugger/dnSpy.Debugger.DotNet.Mono/Impl/DbgEngineImpl.cs @@ -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); }