Merge pull request #519 from xpunch/master

missing nil check for grpc WaitGroup
This commit is contained in:
Asim Aslam 2019-06-17 10:30:28 +01:00 committed by GitHub
commit a619321b64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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