diff --git a/src/libnmdc/libnmdc.go b/src/libnmdc/libnmdc.go index c74f907..554e612 100644 --- a/src/libnmdc/libnmdc.go +++ b/src/libnmdc/libnmdc.go @@ -341,7 +341,7 @@ func (this *HubConnection) worker() { this.conn, err = net.Dial("tcp", this.Hco.Address.GetHostOnly()) } - if err == nil { + if err != nil { this.OnEvent <- HubEvent{EventType: EVENT_CONNECTION_STATE_CHANGED, StateChange: CONNECTIONSTATE_CONNECTING} this.connValid = false } else {