missing nil check for grpc WaitGroup

This commit is contained in:
johnson 2019-06-17 17:07:55 +08:00 committed by Vasiliy Tolstov
parent 0635d2c2ca
commit 6d0872a1df

View File

@ -231,9 +231,13 @@ func (g *grpcServer) createSubHandler(sb *subscriber, opts server.Options) broke
fn = opts.SubWrappers[i-1](fn)
}
if g.wg != nil {
g.wg.Add(1)
}
go func() {
if g.wg != nil {
defer g.wg.Done()
}
fn(ctx, &rpcMessage{
topic: sb.topic,
contentType: ct,