Split connected to WebRTC & WebSocket.

This commit is contained in:
Miroslav Šedivý
2020-11-25 20:02:53 +01:00
parent bc77c8f8f5
commit fa54823098
4 changed files with 41 additions and 7 deletions

View File

@ -187,9 +187,13 @@ func (ws *WebSocketManagerCtx) handle(connection *websocket.Conn, session types.
ticker := time.NewTicker(pingPeriod)
go func() {
// TODO: Change WebSocket connection state.
//session.SetConnected(true)
defer func() {
ticker.Stop()
ws.logger.Debug().Str("address", connection.RemoteAddr().String()).Msg("handle socket ending")
// TODO: Change WebSocket connection state.
session.SetConnected(false)
}()