diff --git a/emulator/gameview.go b/emulator/gameview.go index 22f5ce8e..9bbd814a 100644 --- a/emulator/gameview.go +++ b/emulator/gameview.go @@ -86,6 +86,8 @@ func NewGameView(console *nes.Console, title, saveFile string, imageChannel chan // ListenToInputChannel listen from input channel streamm, which is exposed to WebRTC session func (view *GameView) ListenToInputChannel() { for { + // Adding ok here make thing slowdown + // TODO: Investigate keysInBinary, ok := <-view.inputChannel if !ok { return diff --git a/webrtc/webrtc.go b/webrtc/webrtc.go index 1b64c296..1b98d8e2 100644 --- a/webrtc/webrtc.go +++ b/webrtc/webrtc.go @@ -165,8 +165,8 @@ func (w *WebRTC) StartClient(remoteSession string, width, height int) (string, e }) inputTrack.OnClose(func() { - fmt.Println("Data channel closed") - fmt.Println("Closed webrtc") + log.Println("Data channel closed") + log.Println("Closed webrtc") //close(w.Done) //w.StopClient() })