From cd8e94fd4dca6b11afa96e93998706e160072aca Mon Sep 17 00:00:00 2001 From: Matt Reiferson Date: Thu, 6 Nov 2014 09:57:08 -0800 Subject: [PATCH] return ErrNotConnected --- consumer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consumer.go b/consumer.go index 0e40dabb..0173a8ec 100644 --- a/consumer.go +++ b/consumer.go @@ -533,7 +533,7 @@ func (r *Consumer) DisconnectFromNSQD(addr string) error { idx := indexOf(addr, r.nsqdTCPAddrs) if idx == -1 { - return errors.New(fmt.Sprintf("unknown nsqd TCP address %s", addr)) + return ErrNotConnected } // slice delete @@ -557,7 +557,7 @@ func (r *Consumer) DisconnectFromNSQLookupd(addr string) error { idx := indexOf(addr, r.lookupdHTTPAddrs) if idx == -1 { - return errors.New(fmt.Sprintf("unknown nsqlookupd HTTP address %s", addr)) + return ErrNotConnected } if len(r.lookupdHTTPAddrs) == 1 {