From 47dcc0bf4dd0d67d0601d5ace750f00bdb8f0a99 Mon Sep 17 00:00:00 2001 From: 0ceanSlim Date: Tue, 23 Jul 2024 13:24:44 -0400 Subject: [PATCH] handler renamed listener --- main.go | 2 +- server/{server.go => relay.go} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename server/{server.go => relay.go} (99%) diff --git a/main.go b/main.go index 1deba8a..0ef423a 100644 --- a/main.go +++ b/main.go @@ -27,7 +27,7 @@ func main() { defer db.DisconnectDB() // Start WebSocket server - http.Handle("/", websocket.Handler(server.Handler)) + http.Handle("/", websocket.Handler(server.Listener)) fmt.Println("WebSocket server started on", config.Server.Address) err = http.ListenAndServe(config.Server.Address, nil) if err != nil { diff --git a/server/server.go b/server/relay.go similarity index 99% rename from server/server.go rename to server/relay.go index 2854453..85c20f4 100644 --- a/server/server.go +++ b/server/relay.go @@ -14,7 +14,7 @@ import ( var subscriptions = make(map[string]server.Subscription) -func Handler(ws *websocket.Conn) { +func Listener(ws *websocket.Conn) { defer ws.Close() var msg string