mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-23 18:17:32 +00:00
client closes peerconnection
This commit is contained in:
parent
8c4f6f624e
commit
2a782100a0
4 changed files with 25 additions and 5 deletions
|
|
@ -171,12 +171,15 @@ func (r *Room) removeSession(w *webrtc.WebRTC) {
|
|||
}
|
||||
|
||||
func (r *Room) Close() {
|
||||
log.Println("Closing room", r.ID)
|
||||
if r.Done == false {
|
||||
log.Println("Closing room", r.ID)
|
||||
log.Println("Closing director of room ", r.ID)
|
||||
close(r.director.Done)
|
||||
log.Println("Closing input of room ", r.ID)
|
||||
close(r.inputChannel)
|
||||
r.Done = true
|
||||
}
|
||||
r.Done = true
|
||||
log.Println("Closing director of room ", r.ID)
|
||||
close(r.director.Done)
|
||||
log.Println("Closing input of room ", r.ID)
|
||||
close(r.inputChannel)
|
||||
// Close here is a bit wrong because this read channel
|
||||
//close(r.imageChannel)
|
||||
//close(r.audioChannel)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue