mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
WebSocketHandler no return.
This commit is contained in:
parent
26c2bbf10d
commit
01d125316f
@ -9,7 +9,7 @@ type WebSocket interface {
|
||||
}
|
||||
|
||||
type WebSocketHandler interface {
|
||||
Start() error
|
||||
Start()
|
||||
Shutdown() error
|
||||
Upgrade(w http.ResponseWriter, r *http.Request) error
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user