icerpc-csharp icon indicating copy to clipboard operation
icerpc-csharp copied to clipboard

Missing Quic keep alive option to enable keep alive

Open bentoi opened this issue 2 years ago • 3 comments

There's no option to enable keep alive on a Quic connection. As a consequence the Quic connection might idle timeout if there's no activity and even if an icerpc request is pending. This is quite bad IMO.

Should we consider adding a workaround to keep alive the Quic connection? One option would be to open an unidirectional stream to send a byte regularly (implemented in the Quic transport).

See also https://github.com/dotnet/runtime/issues/87478. Hopefully this will motivate the Quic developers for adding this option.

bentoi avatar Jun 13 '23 13:06 bentoi

See also: https://github.com/microsoft/msquic/issues/3880

bernardnormier avatar Nov 15 '23 16:11 bernardnormier

FYI, they added KeepAliveInterval which I believe can be used for this purpose: https://github.com/dotnet/runtime/pull/94211

bentoi avatar Dec 27 '23 08:12 bentoi

Let's update the code conditionally (and add a test) once dotnet 9 preview 1 is out.

bernardnormier avatar Jan 29 '24 21:01 bernardnormier