docs(shared-state): say long streams drop out of the in-flight count

The request timeout is progress-based, so a stream that keeps sending
data can outlive the in-flight read window. It then drops out of the
shared count. The count can only be too low for such streams.
This commit is contained in:
2026-11-26 04:15:41 +00:00
parent 8e756c064d
commit 0852e59c09
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ func (g *Gateway) wireSharedState(cfg *Config) {
}
}
// maxProviderTimeout is the longest request timeout any provider can run, which bounds how long an in-flight count stays live.
// maxProviderTimeout is the longest request timeout any provider has, which sets the in-flight read window.
// The timeout is progress-based, so a stream can outlive it and drop out of the count: an under-count only.
func maxProviderTimeout(cfg *Config) time.Duration {
global, err := resolveRequestTimeout(cfg.RequestTimeout, "requestTimeout")
if err != nil {