Skip to content

Commit

Permalink
return ErrNotConnected
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiferson committed Nov 6, 2014
1 parent 5ee66d2 commit cd8e94f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit cd8e94f

Please sign in to comment.