From 01d125316f171c634ae5e8ffa562e7c5d107e4ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 28 Oct 2020 20:29:18 +0100 Subject: [PATCH] WebSocketHandler no return. --- internal/types/webscoket.go | 2 +- internal/websocket/websocket.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/types/webscoket.go b/internal/types/webscoket.go index d5b63360..fd924b47 100644 --- a/internal/types/webscoket.go +++ b/internal/types/webscoket.go @@ -9,7 +9,7 @@ type WebSocket interface { } type WebSocketHandler interface { - Start() error + Start() Shutdown() error Upgrade(w http.ResponseWriter, r *http.Request) error } diff --git a/internal/websocket/websocket.go b/internal/websocket/websocket.go index 523120e2..a09151bc 100644 --- a/internal/websocket/websocket.go +++ b/internal/websocket/websocket.go @@ -54,7 +54,7 @@ type WebSocketHandler struct { shutdown chan bool } -func (ws *WebSocketHandler) Start() error { +func (ws *WebSocketHandler) Start() { ws.sessions.OnCreated(func(id string, session types.Session) { if err := ws.handler.SessionCreated(id, session); err != nil { ws.logger.Warn().Str("id", id).Err(err).Msg("session created with and error") @@ -108,8 +108,6 @@ func (ws *WebSocketHandler) Start() error { } } }() - - return nil } func (ws *WebSocketHandler) Shutdown() error {