Skip to content

Commit 8703309

Browse files
committed
Remove old ping/pong handlers
1 parent da51639 commit 8703309

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

web/js/controller.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
// first user interaction
1111
let interacted = false;
1212

13-
// ping-pong
14-
// let pingPong = 0;
1513
const menuScreen = document.getElementById('menu-screen');
1614
const helpOverlay = document.getElementById('help-overlay');
1715
const playerIndex = document.getElementById('playeridx');
@@ -56,23 +54,7 @@
5654
message.show('Now you can share you game!');
5755
};
5856

59-
// const onWebrtcMessage = () => {
60-
// event.pub(PING_RESPONSE);
61-
// };
62-
6357
const onConnectionReady = () => {
64-
// ping / pong
65-
// if (pingPong === 0) {
66-
// pingPong = setInterval(() => {
67-
// if (!webrtc.message('x')) {
68-
// clearInterval(pingPong);
69-
// pingPong = 0;
70-
// log.info("ping-pong was disabled due to remote channel error");
71-
// }
72-
// event.pub(PING_REQUEST, {time: Date.now()})
73-
// }, 10000);
74-
// }
75-
7658
// start a game right away or show the menu
7759
if (room.getId()) {
7860
startGame();
@@ -471,10 +453,6 @@
471453
event.sub(WEBRTC_CONNECTION_READY, onConnectionReady);
472454
event.sub(WEBRTC_CONNECTION_CLOSED, () => {
473455
input.poll.disable();
474-
// if (pingPong > 0) {
475-
// clearInterval(pingPong);
476-
// pingPong = 0;
477-
// }
478456
webrtc.stop();
479457
});
480458
event.sub(LATENCY_CHECK_REQUESTED, onLatencyCheck);

0 commit comments

Comments
 (0)