From ca6320593449d49ffce69f706fd882eb686a9c92 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Mon, 28 Aug 2023 13:23:25 -0700 Subject: [PATCH] Quality Fixup --- app/plugins/contactRetry.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 }