Skip to content

Commit f38390e

Browse files
committed
Network: catch CircuitDestroyedException
This error is not catched because of removing generic try-with and causes a red CI. In this commit we catch this error and kill child circuits. ``` Unexpected exception happened in the retry loop, ex = System.AggregateException: One or more errors occurred. (Circuit got destroyed, reason ChannelClosed) ---> NOnion.CircuitDestroyedException: Circuit got destroyed, reason ChannelClosed --- End of inner exception stack trace --- The active test run was aborted. Reason: Test host process crashed : Unhandled exception. System.AggregateException: One or more errors occurred. (Circuit got destroyed, reason ChannelClosed) ---> NOnion.CircuitDestroyedException: Circuit got destroyed, reason ChannelClosed --- End of inner exception stack trace --- at [email protected](ExceptionDispatchInfo edi) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 907 at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 109 at <StartupCode$FSharp-Core>[email protected](Object o) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 165 at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() ```
1 parent 186e075 commit f38390e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

NOnion/Network/TorGuard.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,10 @@ type TorGuard private (client: TcpClient, sslStream: SslStream) =
352352
self.HandleIncomingCellException<CircuitDecryptionFailedException>
353353
cell
354354
ex
355+
| :? CircuitDestroyedException as ex ->
356+
self.HandleIncomingCellException<CircuitDestroyedException>
357+
cell
358+
ex
355359
| ex -> return raise <| FSharpUtil.ReRaise ex
356360
| None ->
357361
self.KillChildCircuits()

0 commit comments

Comments
 (0)