mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-11-21 16:17:13 +00:00
handler renamed listener
This commit is contained in:
parent
2b0186e499
commit
47dcc0bf4d
2
main.go
2
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 {
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user