handler renamed listener

This commit is contained in:
0ceanSlim 2024-07-23 13:24:44 -04:00
parent 2b0186e499
commit 47dcc0bf4d
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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