mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
sessions Destroy log error.
This commit is contained in:
parent
f521373f9b
commit
f751cba428
@ -151,13 +151,17 @@ func (manager *WebRTCManager) CreatePeer(id string, session types.Session) (stri
|
|||||||
case webrtc.PeerConnectionStateDisconnected:
|
case webrtc.PeerConnectionStateDisconnected:
|
||||||
case webrtc.PeerConnectionStateFailed:
|
case webrtc.PeerConnectionStateFailed:
|
||||||
manager.logger.Info().Str("id", id).Msg("peer disconnected")
|
manager.logger.Info().Str("id", id).Msg("peer disconnected")
|
||||||
manager.sessions.Destroy(id)
|
if err = manager.sessions.Destroy(id); err != nil {
|
||||||
|
manager.logger.Warn().Err(err).Msg("error while destroying session")
|
||||||
|
}
|
||||||
break
|
break
|
||||||
case webrtc.PeerConnectionStateConnected:
|
case webrtc.PeerConnectionStateConnected:
|
||||||
manager.logger.Info().Str("id", id).Msg("peer connected")
|
manager.logger.Info().Str("id", id).Msg("peer connected")
|
||||||
if err = session.SetConnected(true); err != nil {
|
if err = session.SetConnected(true); err != nil {
|
||||||
manager.logger.Warn().Err(err).Msg("unable to set connected on peer")
|
manager.logger.Warn().Err(err).Msg("unable to set connected on peer")
|
||||||
manager.sessions.Destroy(id)
|
if err = manager.sessions.Destroy(id); err != nil {
|
||||||
|
manager.logger.Warn().Err(err).Msg("error while destroying session")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user