X-Git-Url: https://code.octet-stream.net/broadcaster/blobdiff_plain/d14180328760fa282068927068ca5675b9427bc2..a098a4fcbfe0649cfd9d171e59e822a4bd1b2ec4:/server/radio_sync.go?ds=sidebyside diff --git a/server/radio_sync.go b/server/radio_sync.go index 9fd9a65..66521f8 100644 --- a/server/radio_sync.go +++ b/server/radio_sync.go @@ -1,7 +1,7 @@ package main import ( - "code.octet-stream.net/broadcaster/protocol" + "code.octet-stream.net/broadcaster/internal/protocol" "encoding/json" "golang.org/x/net/websocket" "log" @@ -53,6 +53,8 @@ func RadioSync(ws *websocket.Conn) { radio = r log.Println("Radio authenticated:", radio.Name) isAuthenticated = true + commandRouter.AddWebsocket(r.Id, ws) + defer commandRouter.RemoveWebsocket(ws) go KeepFilesUpdated(ws) go KeepPlaylistsUpdated(ws)