Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
close pubsub
Browse files Browse the repository at this point in the history
  • Loading branch information
andremedeiros committed Apr 1, 2023
1 parent cd0645a commit d8ddfc7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/distributedlock/distributed_lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func (d *DistributedLock) WaitAcquireLock(ctx context.Context, key string, timeo

ch := fmt.Sprintf(lockTopicFormat, key)
pubsub := d.client.Subscribe(ctx, ch)
defer func() { _ = pubsub.Close() }()

select {
case <-time.After(timeout):
Expand Down

0 comments on commit d8ddfc7

Please sign in to comment.