transport: minor cleanups (comment and error text) (#1576)

This commit is contained in:
dfawley
2017-10-12 15:51:13 -07:00
committed by GitHub
parent 5131c1f096
commit c209cdff16
2 changed files with 7 additions and 2 deletions

View File

@ -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
}

View File

@ -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():