grpc / grpc-swift

The Swift language implementation of gRPC.
Apache License 2.0
2.04k stars 420 forks source link

Server timeouts in the NIO implementation #462

Open glbrntt opened 5 years ago

glbrntt commented 5 years ago

At the moment the NIO implementation has timeouts on the client but not on the server. We should add timeouts to the server as well.

MrMage commented 5 years ago

Adding context from https://github.com/grpc/grpc-swift/pull/459#discussion_r282356734:

When adding that, we should also make sure that all promises (status and response) are being fulfilled (probably with an error) when the timeout occurs.

It might also be nice to set a maximum timeout on the server object, to prevent malicious clients from opening many requests with very long timeouts.

SebastianThiebaud commented 4 years ago

This issue can probably be resolved once https://github.com/grpc/grpc-swift/pull/850 is in.

glbrntt commented 4 years ago

This is a different issue: it's related to timing out an RPC based on the grpc-timeout header sent by the client.