madsim-rs / madsim

Magical Deterministic Simulator for distributed systems in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature: support timeout in tonic requests

bsbds opened this issue · comments

commented

Currently tonic support the grpc-timeout metadata in requests (Ref: https://docs.rs/tonic/latest/tonic/struct.Request.html#method.set_timeout).
However, it appears that this option is currently being ignored in the implementation of madsim, which may cause a client to indefinitely wait for the server.

Should we consider implement this in madsim?

Indeed. We have supported setting a global timeout for client in #132. But it's not yet implemented for each individual request. I'll add it soon.

A new version madsim-tonic v0.2.25 has been published with this feature. Please update and have a try!