-
Notifications
You must be signed in to change notification settings - Fork 218
.NET Binding: Setting keepAliveTimeout to TimeSpan.Max will flood connection #381
Comments
Just to add this is on x86 build, in case that matters. |
Is this a regression in3.0 or also an issue on 2.x? |
We believe it was a regression in 3.0. |
The underlying issue is that we switched the duration representation in 3.0 to use We need to clamp the values to their max/min representations here. std::chrono is kind of a dumpster fire with all the special rules and different bit widths for different templates specializations :/ |
@sidhoda Can you continue your evaluation on the |
@jadamcrain I've tested the change on behalf of @sidhoda and it no longer floods the connection. |
TimeSpan.Max is converted to milliseconds as 922337203685477, which is passed into TimeDuration ctor as a duration_t value of -580800 nanoseconds. This causes the keep alive timer to constantly fire, flooding the connection.
The following fix works, however I'm sure there's a better way.
The text was updated successfully, but these errors were encountered: