mirror of
https://github.com/m1k1o/neko.git
synced 2025-07-30 06:50:55 +02:00
fix kicked message for legacy implementation.
This commit is contained in:
parent
4f401ac2b6
commit
82aa68097b
2 changed files with 11 additions and 1 deletions
|
@ -47,7 +47,12 @@ func (session *SessionCtx) profileChanged() {
|
|||
}
|
||||
|
||||
if (!session.profile.CanConnect || !session.profile.CanLogin || !session.profile.CanWatch) && session.state.IsWatching {
|
||||
session.GetWebRTCPeer().Destroy()
|
||||
// TODO: Needed for legacy implementation. Websocket must die before webrtc and deliver signal close message
|
||||
// otherwise webrtc destroy would trigger websocket reconnect. In case of kick event, webrtc destroy is called
|
||||
// before websocket destroy that delivers the information about the kick.
|
||||
time.AfterFunc(time.Second, func() {
|
||||
session.GetWebRTCPeer().Destroy()
|
||||
})
|
||||
}
|
||||
|
||||
if (!session.profile.CanConnect || !session.profile.CanLogin) && session.state.IsConnected {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue