From c209cdff16049a924bef4aa5c6f7588f0b42b2fa Mon Sep 17 00:00:00 2001 From: dfawley Date: Thu, 12 Oct 2017 15:51:13 -0700 Subject: [PATCH] transport: minor cleanups (comment and error text) (#1576) --- transport/http2_client.go | 2 +- transport/transport.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/transport/http2_client.go b/transport/http2_client.go index 1abb62e6..6ca6cc6b 100644 --- a/transport/http2_client.go +++ b/transport/http2_client.go @@ -1253,7 +1253,7 @@ func (t *http2Client) itemHandler(i item) error { } err = t.framer.fr.WritePing(i.ack, i.data) default: - errorf("transport: http2Client.controller got unexpected item type %v\n", i) + errorf("transport: http2Client.controller got unexpected item type %v", i) } return err } diff --git a/transport/transport.go b/transport/transport.go index bde8fa5c..2cf9bd34 100644 --- a/transport/transport.go +++ b/transport/transport.go @@ -703,7 +703,12 @@ func (e StreamError) Error() string { return fmt.Sprintf("stream error: code = %s desc = %q", e.Code, e.Desc) } -// wait blocks until it can receive from one of the provided contexts or channels +// wait blocks until it can receive from one of the provided contexts or +// channels. ctx is the context of the RPC, tctx is the context of the +// transport, done is a channel closed to indicate the end of the RPC, goAway +// is a channel closed to indicate a GOAWAY was received, and proceed is a +// quota channel, whose received value is returned from this function if none +// of the other signals occur first. func wait(ctx, tctx context.Context, done, goAway <-chan struct{}, proceed <-chan int) (int, error) { select { case <-ctx.Done():