From 82fc76d6ab592a5e20fe4d287163b0e275a216ba Mon Sep 17 00:00:00 2001 From: Tamer Tas Date: Tue, 20 Sep 2016 22:17:06 +0300 Subject: [PATCH] messaging/publish-subscribe: fix channel read --- messaging/publish_subscribe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/publish_subscribe.md b/messaging/publish_subscribe.md index 79d4405..638363e 100644 --- a/messaging/publish_subscribe.md +++ b/messaging/publish_subscribe.md @@ -27,7 +27,7 @@ type Subscription struct { } func (s *Subscription) Publish(msg Message) error { - if _, ok := s.ch; !ok { + if _, ok := <-s.ch; !ok { return errors.New("Topic has been closed") }