diff --git a/client.go b/client.go index d167341..2983b81 100644 --- a/client.go +++ b/client.go @@ -150,6 +150,7 @@ func (c *Client) recv(receiver chan<- interface{}) (err error) { for { val, err := next(c.Session.decoder) if err != nil { + close(receiver) return err } receiver <- val