diff --git a/src/main/room/netplay/NetClient.js b/src/main/room/netplay/NetClient.js index 84980d5..e6e0ba0 100644 --- a/src/main/room/netplay/NetClient.js +++ b/src/main/room/netplay/NetClient.js @@ -43,11 +43,11 @@ jt.NetClient = function(room) { wsOnly = false; if (ws) { - ws.onpen = ws.onclose = ws.onmessage = undefined; + ws.onopen = ws.onclose = ws.onmessage = undefined; ws.close(); ws = undefined; } - if (dataChannel) dataChannel.onpen = dataChannel.onclose = dataChannel.onmessage = undefined; + if (dataChannel) dataChannel.onopen = dataChannel.onclose = dataChannel.onmessage = undefined; if (rtcConnection) rtcConnection.onicecandidate = rtcConnection.ondatachannel = undefined; dataChannelActive = false; @@ -177,7 +177,7 @@ jt.NetClient = function(room) { function stopRTC() { if (dataChannel) { - dataChannel.onpen = dataChannel.onclose = dataChannel.onmessage = undefined; + dataChannel.onopen = dataChannel.onclose = dataChannel.onmessage = undefined; dataChannel.close(); dataChannel = undefined; } @@ -291,4 +291,4 @@ jt.NetClient.sendKeepAlive = function() { .finally(function() { if (Javatari.SERVER_KEEPALIVE > 0) setTimeout(jt.NetClient.sendKeepAlive, Javatari.SERVER_KEEPALIVE); }); -}; \ No newline at end of file +};