Skip to content

Commit

Permalink
Simplification of the command retrier
Browse files Browse the repository at this point in the history
- Send the response size to the public io.Reader using the existing
  pipe rather than using a dedicated channel.
- Be sure to guard reads from / writes to unbffered channels with the
  tomb dying channel to that they are automatically unblocked without
  having to close them.
- Be consistent about returning tomb.ErrDying from goroutines that are
  terminating early because they are dying.
- Close the underlying transport directly from the public io.Closer
  API - make it clear in the documentation for the Transport interface
  that whilst Read/Write should only be used from a single goroutine,
  that Close may be called from any goroutine.
  • Loading branch information
chrisccoulson committed Nov 26, 2024
1 parent 23582c9 commit f1d394f
Showing 1 changed file with 188 additions and 133 deletions.
Loading

0 comments on commit f1d394f

Please sign in to comment.