Skip to content

Commit

Permalink
fix: unsubscribe nats subscription when stream is done (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-nicolas committed Jun 6, 2023
1 parent 430dac7 commit 5fe6e9b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/stargate/internal/server/grpc/api.go
Expand Up @@ -82,6 +82,7 @@ func (s *Server) Stargate(stream api.StargateService_StargateServer) error {
}...)
return status.Errorf(codes.Internal, "cannot subscribe to nats subject")
}
defer sub.Unsubscribe()

eg, ctx := errgroup.WithContext(ctx)

Expand Down

1 comment on commit 5fe6e9b

@vercel
Copy link

@vercel vercel bot commented on 5fe6e9b Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.