From 1f17fc4f98d8a124c2762af27a2633ee5eff6071 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 27 Jun 2016 22:49:18 +0200 Subject: send close message after done diff --git a/src/rhimportd/ctrlWebSocket.go b/src/rhimportd/ctrlWebSocket.go index 410c209..892cf3a 100644 --- a/src/rhimportd/ctrlWebSocket.go +++ b/src/rhimportd/ctrlWebSocket.go @@ -314,7 +314,7 @@ func webSocketSessionHandler(reqchan <-chan webSocketRequestData, binchan <-chan sendWebSocketProgressResponse(ws, session.id, session.refId, p.Step, p.StepName, p.Current, p.Total) case d := <-session.donechan: sendWebSocketDoneResponse(ws, d.ResponseCode, d.ErrorString, session.id, session.refId, d.Cart, d.Cut) - // TODO: send close message at this point? + ws.WriteControl(websocket.CloseMessage, []byte{}, time.Now().Add(time.Minute)) } } } -- cgit v0.10.2