Skip to content

Commit 82fc76d

Browse files
authored
messaging/publish-subscribe: fix channel read
1 parent d717978 commit 82fc76d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

messaging/publish_subscribe.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type Subscription struct {
2727
}
2828

2929
func (s *Subscription) Publish(msg Message) error {
30-
if _, ok := s.ch; !ok {
30+
if _, ok := <-s.ch; !ok {
3131
return errors.New("Topic has been closed")
3232
}
3333

0 commit comments

Comments
 (0)