Replies: 1 comment 3 replies
-
Unobserved faulted tasks don't crash the process. Only .NET Framework 4.0 did that. 4.5+ removed that behavior. So awaiting Throwing exceptions that are not caught, all the way down to the thread start method on the other hand... that will crash the process. And that appears to be what's happening here, as you have surmised. That all said, StreamJsonRpc could make a change to swallow these exceptions, I suppose. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use
JsonRpc
over custom network-basedDataChannelStream
, wrapped inBrotliStream
for compression. I use the simplifiedJsonRpc.Attach<T>(stream)
to obtain the wrapper for the remote service.The problem is when connection drops (I'm not quite sure for the reason, but it is not important right now), the whole app crashes due to (as far as I understand it) unobserved exception in a worker thread. Here's the stack trace:
Is creating
JsonRpc
instance explicitly and awaiting itsCompletion
my only option here?P.S. Here
FullDuplexStream
is used becauseBrotliStream
is not full-duplex (e.g. I have to create one for receiving + decompression and another for compression + sending)P.P.S.
StreamJsonRpc
v2.19.27Beta Was this translation helpful? Give feedback.
All reactions