Skip to content

Commit

Permalink
release subMux lock in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed Apr 7, 2022
1 parent 166c1c7 commit 78dec6b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client_sub.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ func (c *Client) publish(ctx context.Context) error {

sub, ok := c.subs[res.SubscriptionID]
if !ok {
c.subMux.Unlock()
// todo(fs): should we return an error here?
dlog.Printf("error: unknown subscription %d", res.SubscriptionID)
return nil
Expand Down

0 comments on commit 78dec6b

Please sign in to comment.