refactor: rename HandleConnections to HandleConnection

- rename function to better reflect its purpose

🤖
This commit is contained in:
Sebastian Mark 2024-10-29 18:49:00 +01:00
parent b8823acc97
commit cb1ef6c897

View file

@ -18,8 +18,8 @@ var upgrader = websocket.Upgrader{
CheckOrigin: func(r *http.Request) bool { return true }, CheckOrigin: func(r *http.Request) bool { return true },
} }
// HandleConnections upgrades HTTP requests to WebSocket connections and manages the client lifecycle. // HandleConnection upgrades HTTP requests to WebSocket connections and manages the client lifecycle.
func HandleConnections(w http.ResponseWriter, r *http.Request) { func HandleConnection(w http.ResponseWriter, r *http.Request) {
// Upgrade initial GET request to a WebSocket // Upgrade initial GET request to a WebSocket
ws, err := upgrader.Upgrade(w, r, nil) ws, err := upgrader.Upgrade(w, r, nil)
if err != nil { if err != nil {