add control message when closing websocket connection
@@ -157,6 +157,7 @@ func (w *WebsocketServer) ServeHTTP(writer http.ResponseWriter, request *http.Re
}
defer func() {
+ ws.WriteControl(gorilla.CloseMessage, gorilla.FormatCloseMessage(gorilla.CloseNormalClosure, ""), time.Now().Add(5*time.Second))
ws.Close()
}()
