Skip to content

Commit

Permalink
Fix deadlock in GoChannel (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
m110 authored Jan 21, 2023
1 parent f6254b4 commit 6adfe4e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pubsub/gochannel/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ func (g *GoChannel) Subscribe(ctx context.Context, topic string) (<-chan *messag
g.closedLock.Lock()

if g.closed {
g.closedLock.Unlock()
return nil, errors.New("Pub/Sub closed")
}

Expand Down

0 comments on commit 6adfe4e

Please sign in to comment.