close grpc connections during errors

This commit is contained in:
Chris Lu 2019-04-11 09:27:05 -07:00
parent db1360c36a
commit e11e127d91

View file

@ -81,6 +81,7 @@ func WithCachedGrpcClient(ctx context.Context, fn func(*grpc.ClientConn) error,
grpcClientsLock.Lock()
delete(grpcClients, address)
grpcClientsLock.Unlock()
grpcConnection.Close()
}
return err