summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dolmetschctl/dolmetschctl.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/dolmetschctl/dolmetschctl.go b/cmd/dolmetschctl/dolmetschctl.go
index 9e878a8..86fde95 100644
--- a/cmd/dolmetschctl/dolmetschctl.go
+++ b/cmd/dolmetschctl/dolmetschctl.go
@@ -122,7 +122,8 @@ func handleWebSocketMessage(ctrl *controller.Controller, ws *websocket.Conn, msg
func run(ctrl *controller.Controller, ws *websocket.Conn) error {
ctrlCh := make(chan controller.Event, 100)
- ctrl.Subscribe(ctrlCh)
+ unsub := ctrl.Subscribe(ctrlCh)
+ defer close(unsub)
wsCh := make(chan types.WebSocketResponseFull)
go wsReader(ws, wsCh)