reid před 2 roky
rodič
revize
90ba4d4316
2 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 1 1
      auth/auth.go
  2. 1 0
      broadcast/broadcast.go

+ 1 - 1
auth/auth.go

@@ -39,8 +39,8 @@ var (
 // check if websocket session is in the auth map
 // check if websocket session is in the auth map
 func WsIsAuthenticated(conn *websocket.Conn) bool {
 func WsIsAuthenticated(conn *websocket.Conn) bool {
 	AuthenticatedClients.Lock()
 	AuthenticatedClients.Lock()
+	defer AuthenticatedClients.Unlock()
 	_, exists := AuthenticatedClients.Conns[conn]
 	_, exists := AuthenticatedClients.Conns[conn]
-	AuthenticatedClients.Unlock()
 	return exists
 	return exists
 }
 }
 
 

+ 1 - 0
broadcast/broadcast.go

@@ -184,6 +184,7 @@ func constructPierInfo(piers []string) (map[string]structs.Urbit, error) {
 		// and insert the struct into the map we will use as input for the broadcast struct
 		// and insert the struct into the map we will use as input for the broadcast struct
 		updates[pier] = urbit
 		updates[pier] = urbit
 	}
 	}
+	config.Logger.Info("Pier info constructed")
 	return updates, nil
 	return updates, nil
 }
 }