Open t089 opened 1 year ago
How can I check in Swift on the server side, if the client cancelled the request...
If the client cancels then the stream will be closed and the Task
executing the server handler will be cancelled.
...or the client provided deadline exceeded? The GRPCAsyncServerCallContext does not seem to give much info on this.
We don't currently monitor this on the server side; if the client set a timeout the 'grpc-timeout' header will be set, so it should be possible to parse that into a timeout which in turn can be made into a deadline. We don't currently have code to do that but it shouldn't be too difficult to do.
That sound's great, thank you!
From the gRPC docs:
How can I check in Swift on the server side, if the client cancelled the request or the client provided deadline exceeded? The
GRPCAsyncServerCallContext
does not seem to give much info on this.Related, is the deadline passed to the server so that I can use it as a deadline for other dependent calls?