mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-22 17:47:11 +00:00
Update close encoder channel
This commit is contained in:
parent
27df07e04d
commit
c75efdc559
4 changed files with 75 additions and 48 deletions
|
|
@ -74,6 +74,12 @@ func (h *Handler) GetWeb(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
// WS handles normal traffic (from browser to host)
|
||||
func (h *Handler) WS(w http.ResponseWriter, r *http.Request) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Println("Warn: Something wrong. Recovered in f", r)
|
||||
}
|
||||
}()
|
||||
|
||||
c, err := upgrader.Upgrade(w, r, nil)
|
||||
if err != nil {
|
||||
log.Print("[!] WS upgrade:", err)
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ func (r *Room) AddConnectionToRoom(peerconnection *webrtc.WebRTC, playerIndex in
|
|||
func (r *Room) startWebRTCSession(peerconnection *webrtc.WebRTC, playerIndex int) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
fmt.Println("Recovered when sent to close inputChannel")
|
||||
log.Println("Warn: Recovered when sent to close inputChannel")
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue