Skip to content

Commit

Permalink
Merge pull request nsqio#115 from judwhite/master
Browse files Browse the repository at this point in the history
remove unnecessary check on pendingOk
  • Loading branch information
mreiferson committed Feb 10, 2015
2 parents 160dc75 + 4f5779c commit 4b786ba
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,7 @@ func (r *Consumer) ConnectToNSQD(addr string) error {
r.mtx.Unlock()
return ErrAlreadyConnected
}
if !pendingOk {
r.pendingConnections[addr] = conn
}
r.pendingConnections[addr] = conn
if idx := indexOf(addr, r.nsqdTCPAddrs); idx == -1 {
r.nsqdTCPAddrs = append(r.nsqdTCPAddrs, addr)
}
Expand Down

0 comments on commit 4b786ba

Please sign in to comment.