starts receiving data via ResponseStream.MoveNext()
consumer is too slow to process the data, he gets disconnected with RpcException(Aborted, "You're too slow")
consumer finishes processing last bit of data that's available to him, uses RequestStream.WriteAsync() to write an ack, receives RpcException(Cancelled, "") (due to underlying HttpClient being disconnected I presume?)
At this stage, if consumer were to interact with ResponseStream, he'd actually receive the correct Exception.
Is this intended? Could those exceptions be synced up somehow? And most importantly - was the question clear enough or should I write a repro? :D
For visual clue, I suppose best representation would be:
while (await responseStream.MoveNext())
{
var message = responseStream.Current;
ProcessMessage(message); // <--- Takes too long, consumer is disconnected after this line
await requestStream.WriteAsync(message); // <--- this will fail, but it will fail with a different exception than what I'd expect. Tho I understand why it has to be this way.
}
It feels like even knowing that requestStream is dead, you're supposed to finish reading MoveNext() to get the real reason.
Hi,
Recently I've run into the following situation:
ResponseStream.MoveNext()
RpcException(Aborted, "You're too slow")
RequestStream.WriteAsync()
to write an ack, receivesRpcException(Cancelled, "")
(due to underlying HttpClient being disconnected I presume?)At this stage, if consumer were to interact with
ResponseStream
, he'd actually receive the correct Exception.Is this intended? Could those exceptions be synced up somehow? And most importantly - was the question clear enough or should I write a repro? :D
For visual clue, I suppose best representation would be:
It feels like even knowing that
requestStream
is dead, you're supposed to finish readingMoveNext()
to get the real reason.