bjartwolf / http_chatbot

Silly chatbot for talking line delimited text over TCP
2 stars 2 forks source link

AwaitTask throws AggregateException #14

Closed laat closed 9 months ago

laat commented 9 months ago

Appen fungerer, men fikk massevis av disse mens jeg kjørte appen.

Some unknown exception  System.AggregateException: One or more errors occurred. (The operation was canceled.)
 ---> System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
   at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)
   --- End of inner exception stack trace ---

AwaitTask er litt buggy og kaster AggregateException, slik at catch-blokka ikke fungerer som forventa.

https://github.com/fsharp/fslang-suggestions/issues/840