diff --git a/app/plugins/contactRetry.go b/app/plugins/contactRetry.go index be6e6b3..249c3dd 100644 --- a/app/plugins/contactRetry.go +++ b/app/plugins/contactRetry.go @@ -121,9 +121,9 @@ type contactRetry struct { lastCheck time.Time acnProgress int - connections sync.Map //[string]*contact - pendingQueue *connectionQueue - priorityQueue *connectionQueue + connections sync.Map //[string]*contact + pendingQueue *connectionQueue + priorityQueue *connectionQueue authorizedPeers sync.Map } @@ -232,14 +232,14 @@ func (cr *contactRetry) run() { state := connections.ConnectionStateToType()[e.Data[event.ConnectionState]] peer := e.Data[event.RemotePeer] // only handle state change events from pre-authorized peers; - if _,exists := cr.authorizedPeers.Load(peer); exists { + if _, exists := cr.authorizedPeers.Load(peer); exists { cr.handleEvent(peer, state, peerConn) } case event.ServerStateChange: state := connections.ConnectionStateToType()[e.Data[event.ConnectionState]] server := e.Data[event.GroupServer] // only handle state change events from pre-authorized servers; - if _,exists := cr.authorizedPeers.Load(server); exists { + if _, exists := cr.authorizedPeers.Load(server); exists { cr.handleEvent(server, state, serverConn) } case event.QueueJoinServer: @@ -432,7 +432,7 @@ func (cr *contactRetry) handleEvent(id string, state connections.ConnectionState // reject events that contain invalid hostnames...we cannot connect to them // and they could result in spurious connection attempts... - if tor.IsValidHostname(id) == false { + if !tor.IsValidHostname(id) { return }