Skip to content

Commit

Permalink
fix: Return if mq client is nil (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
boecklim authored Jan 13, 2025
1 parent 65770e3 commit 4cedcc5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ func (cl *Client) Subscribe(topic string, msgFunc func([]byte) error) error {
}

func (cl *Client) Shutdown() {
if cl == nil {
return
}

if cl.removableStreamConsumerMapping != nil {
for stream, consumer := range cl.removableStreamConsumerMapping {
err := cl.js.DeleteConsumer(context.Background(), stream, consumer)
Expand Down

0 comments on commit 4cedcc5

Please sign in to comment.