You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: reuse single HttpClient across SealPipeline calls (#19)
Previously SealPipeline.SealAndUploadAsync constructed two HttpClient
instances per call (one for PKG, one for Cryptify), then disposed them.
Under sustained load this exhausts the ephemeral socket range as the
underlying connections accumulate in TIME_WAIT — the classic .NET
HttpClient anti-pattern.
PostGuard now owns a single long-lived HttpClient (SocketsHttpHandler
with PooledConnectionLifetime = 2min so DNS changes are still picked
up) and passes it down to SealPipeline. Callers can also inject their
own HttpClient via PostGuardConfig.HttpClient (DI-friendly; the SDK
does not dispose injected clients). A new PostGuardConfig.Timeout
knob exposes the previously-hidden default 100s.
Closes#11
Co-authored-by: dobby-yivi-agent[bot] <275734547+dobby-yivi-agent[bot]@users.noreply.github.com>
0 commit comments