transport: minor cleanups (comment and error text) (#1576)
diff --git a/transport/http2_client.go b/transport/http2_client.go
index 1abb62e..6ca6cc6 100644
--- a/transport/http2_client.go
+++ b/transport/http2_client.go
@@ -1253,7 +1253,7 @@
}
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 bde8fa5..2cf9bd3 100644
--- a/transport/transport.go
+++ b/transport/transport.go
@@ -703,7 +703,12 @@
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():