Skip to content

Soar v0.2.4

Latest

Choose a tag to compare

@myleshorton myleshorton released this 22 Oct 16:01
fea80aa

Fixes

  • An unused round tripper no longer holds a stream for good.
    • The bug: NewRoundTripper confirms its connection before returning, and that connection holds one of the session's streams until a request takes it. A round tripper discarded unused, as a race does when another transport wins, kept its stream open. Open streams kept the session from looking idle, so it was never retired. Once MaxStreams (64 by default) had leaked, every dial failed with soar: too many streams until the process restarted.
    • Impact: one Windows client on a Lantern beta failed every Soar attempt about 1,800 times over two days. It was losing short races to Unbounded's signaling polls, which run every ~14 s.
    • The fix: the returned transport implements io.Closer. Close releases an untaken connection and closes idle connections. An untaken connection also closes itself after 10 s, for callers that never call Close. (#15)
  • getlantern/kindling#61 makes kindling's race close the round trippers it doesn't use. Either fix alone stops this leak.

Compatibility

There are no API changes: NewRoundTripper still returns an http.RoundTripper, which can now also be asserted to io.Closer. The wire protocol is unchanged: v0.2.4 interoperates with v0.2.x, v0.1.0 and soar-rs clients and servers. soar-rs needs no matching change, since its connections close their streams when dropped.

Full changelog: v0.2.3...v0.2.4