Closed lokichoggio closed 3 years ago
add else
func (r *gRPCReporter) Close() {
if r.sendCh != nil {
close(r.sendCh)
} else {
r.closeGRPCConn()
}
}
You could send a pull request if you like. @arugal could review from there.
when close gRPCReporter, error like this
go2sky-gRPC2021/09/22 17:03:57 send closing error rpc error: code = Canceled desc = grpc: the client connection is closing go2sky-gRPC2021/09/22 17:03:57 rpc error: code = Canceled desc = grpc: the client connection is closing
if r.sendCh != nil,r.closeStream and r.closeGRPCConn (line 268) maybe called after r.closeGRPCConn (line 236)
https://github.com/SkyAPM/go2sky/blob/b16c9f07fef6a007b94f940566af4374a5bf44dc/reporter/grpc.go#L232-L237
https://github.com/SkyAPM/go2sky/blob/b16c9f07fef6a007b94f940566af4374a5bf44dc/reporter/grpc.go#L247-L273