tracing: Fix panic on closed channel #24
1 changed files with 0 additions and 1 deletions
|
@ -51,7 +51,6 @@ func NewGRPCStreamClientInterceptor() grpc.StreamClientInterceptor {
|
|||
strWrp := newgRPCClientStream(str, desc, finished, done)
|
||||
|
||||
go func() {
|
||||
defer close(finished)
|
||||
fyrchik marked this conversation as resolved
|
||||
defer close(done)
|
||||
defer span.End()
|
||||
|
||||
|
|
Loading…
Reference in a new issue
Who will close it then?
No one will close this channel. After goroutine closes
done
channel no one can write tofinished
. After GC collects stream, it will be no readers and no writers. It's ok to leave channel open: https://groups.google.com/g/golang-nuts/c/pZwdYRGxCIk/m/qpbHxRRPJdUJ