* When a RST_STREAM is received by the server transport, a cleanupStream
item is placed into controlbuf no matter what.
* Updates comments.
* Replaces getCleanupStream with inline struct initialization.
From [release notes](https://golang.org/doc/go1.12#vet):
The go vet command has been rewritten to serve as the
base for a range of different source code analysis tools. See
the golang.org/x/tools/go/analysis
package for details. A side-effect is that go tool vet
is no longer supported. External tools that use go tool vet must be
changed to use go vet. Using go vet instead of go tool vet should work
with all supported versions of Go.
The client-side traces were otherwise only showing `RPC: to <nil>`,
which is not helpful.
Also clean up construction of traceInfo and firstLine in a few places.
* internal: fix Dial_OneBackoffPerRetryGroup
Instead of mutating global variables, switches getMinConnectDeadline to a
dial option.
Fixes#2687.
* rename getMinConnectTimeoutFunc to minConnectTimeout, ditto dial opt
`Write` can be called concurrently, for which it calls the `do` function.
As `WriteStatus` can close the `ht.writes` in parallel as well the `Write`
will try to write into the `ht.writes` in the `do` function, this can
lead into a panic. As there is no real usability on closing this channel
we can simply leave it to the garbage collector so we can avoid panic
during an execution.
Signed-off-by: André Martins <aanm90@gmail.com>
golang.org/x/lint recently got a go.mod d0100b6bd8
Let's be sure to minimally use this version, since its dependencies are
now codified.
This CL was generated by deleting the x/lint line in go.mod and running
`go mod tidy`.
Currently, it is not possible to access trailers from within a
stats.Handler. The reason is that both stats.Handler and
ClientStream.Trailer require a lock on the ClientStream.
A workaround would be to start a separate goroutine that will call
ClientStream.Trailer asynchronously, but that requires careful
coordination and we can quite easily make the trailer metadata available
to the stats.Handler directly.
Use case: an interceptor that processes trailer metadata for each
streaming RPC after the stream has finished. Note that a
StreamClientInterceptor returns immediately, before the stream has
finished and before the trailer metadata is available.