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

Task can be cancelled on hibernate #145

Open
haf opened this issue Apr 15, 2018 · 2 comments
Open

Task can be cancelled on hibernate #145

haf opened this issue Apr 15, 2018 · 2 comments

Comments

@haf
Copy link
Owner

haf commented Apr 15, 2018

One exception not caught:

System.Exception: Failed to get response ---> System.AggregateException: One or more errors occurred. (A task was canceled.) ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Hopac.Core.TaskToJobAwaiter`1.DoWork(Worker& wr)
   at Hopac.Core.Worker.RunOnThisThread(Scheduler sr, Work work)
   --- End of inner exception stack trace ---
   at HttpFs.Client.getResponseOrFail@953[a,b](FSharpChoice`2 _arg1)
   at Hopac.Core.ContMap`2.DoCont(Worker& wr, X x)
   at Hopac.Once`1.DoJob(Worker& wr, Cont`1 xK)
   at Hopac.Core.JobUsing`2.ContUsing.DoCont(Worker& wr, Y y)
   at Hopac.Core.JobUsing`2.ContUsing.DoCont(Worker& wr, Y y)
   at Hopac.Core.Worker.Run(Scheduler sr, Int32 me)
@ivpadim
Copy link
Collaborator

ivpadim commented Apr 27, 2018

@seanamos any hint of why is that happening?

This is the code 798 I assume is getting canceled because some other alternative is being committed.

@haf How can I reproduce this error? Or is it when running long-time requests?

@haf
Copy link
Owner Author

haf commented Apr 28, 2018

@ivpadim Some guesses: set up mitmproxy, set it to very slow, then call https://discourse.mitmproxy.org/t/killing-tcp-connections/775 flow.kill(); alternatively, you could call Suave with a Async.Sleep 1000 and directly cancelling the async token of the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants