Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic try-with torguard fixed #52

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Nov 21, 2022

  1. Network: try-with with specific exceptions

    Previously, this block had a generic try-with which is
    dangerous since it can cause unwanted behaviours and
    cause confusion for future developers.
    parhamsaremi committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    d16f92f View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2022

  1. Network,TorHandshakes: handle handshake fail

    Previously, TorHandshakes used failwith to raise handshake
    failed error. Since we need to catch it, as a result of
    replacing generic try-with which lead to a red CI in the
    PR, we had to define its special excpetion and catch that:
    
    ```
    The active test run was aborted. Reason: Test host process crashed : Unhandled exception. System.Exception: Key handshake failed!
    
       at NOnion.TorHandshakes.NTorHandshake.NOnion-TorHandshakes-IHandshake-GenerateKdfResult(ICreatedCell serverSideData) in /home/runner/work/NOnion/NOnion/NOnion/TorHandshakes/NTorHandshake.fs:line 112
       at <StartupCode$NOnion>.$TorCircuit.handleIncomingCell@348-1.Invoke(Unit unitVar) in /home/runner/work/NOnion/NOnion/NOnion/Network/TorCircuit.fs:line 352
       at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 398
       at NOnion.Utility.MailboxResultUtil.TryExecuteAsyncAndReplyAsResult@25-3.Invoke(AsyncActivation`1 ctxt) in /home/runner/work/NOnion/NOnion/NOnion/Utility/MailboxUtil.fs:line 25
       at NOnion.Utility.MailboxResultUtil.TryExecuteAsyncAndReplyAsResult@24-6.Invoke(AsyncActivation`1 ctxt) in /home/runner/work/NOnion/NOnion/NOnion/Utility/MailboxUtil.fs:line 24
       at <StartupCode$NOnion>.$TorCircuit.clo@965-15.Invoke(AsyncActivation`1 ctxt) in /home/runner/work/NOnion/NOnion/NOnion/Network/TorCircuit.fs:line 965
       at <StartupCode$NOnion>.$TorCircuit.clo@950-39.Invoke(AsyncActivation`1 ctxt) in /home/runner/work/NOnion/NOnion/NOnion/Network/TorCircuit.fs:line 950
    
       at <StartupCode$FSharp-Core>.$Mailbox.processFirstArrival@303-8.Invoke(AsyncActivation`1 ctxt) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\mailbox.fs:line 303
    
       at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 109
    
    --- End of stack trace from previous location where exception was thrown ---
    
       at Microsoft.FSharp.Control.AsyncPrimitives.Start@907-1.Invoke(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>.$Async.-ctor@163-1.Invoke(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()
    ```
    parhamsaremi committed Nov 24, 2022
    Configuration menu
    Copy the full SHA
    a1534d2 View commit details
    Browse the repository at this point in the history