]> code.octet-stream.net Git - broadcaster/blobdiff - server/radio_sync.go
Allow web user to cancel transmission in progress
[broadcaster] / server / radio_sync.go
index 9fd9a658a834622b8b4a02b560e963b01a231445..2eaef340fdf6bec1d9a430ca5e4447f5b588f33e 100644 (file)
@@ -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)