mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
peer close simplified logging.
This commit is contained in:
parent
c85d00e507
commit
75c1dd6d22
@ -74,11 +74,8 @@ func (peer *WebRTCPeerCtx) Destroy() {
|
||||
|
||||
// TODO: Send webrtc disconnect event via websocket.
|
||||
|
||||
if err := peer.connection.Close(); err != nil {
|
||||
peer.logger.Warn().Err(err).Msg("peer connection destroyed with an error")
|
||||
} else {
|
||||
peer.logger.Info().Msg("peer connection destroyed")
|
||||
}
|
||||
err := peer.connection.Close()
|
||||
peer.logger.Err(err).Msg("peer connection destroyed")
|
||||
|
||||
peer.connection = nil
|
||||
}
|
||||
|
@ -80,11 +80,8 @@ func (peer *WebSocketPeerCtx) Destroy(reason string) {
|
||||
Message: reason,
|
||||
})
|
||||
|
||||
if err := peer.connection.Close(); err != nil {
|
||||
peer.logger.Warn().Err(err).Msg("peer connection destroyed with an error")
|
||||
} else {
|
||||
peer.logger.Info().Msg("peer connection destroyed")
|
||||
}
|
||||
err := peer.connection.Close()
|
||||
peer.logger.Err(err).Msg("peer connection destroyed")
|
||||
|
||||
peer.connection = nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user