Some versions of go returned a non-nil interface containing nil, which when compared directly with nil would fail. Work around that.
@@ -100,6 +100,7 @@ func (b *Broker) Open(conf *BrokerConfig) error {
b.conn, b.connErr = net.DialTimeout("tcp", b.addr, conf.DialTimeout)
if b.connErr != nil {
+ b.conn = nil
Logger.Printf("Failed to connect to broker %s: %s\n", b.addr, b.connErr)
return
}