Commit fea204ec authored by Harlan Lieberman-Berg's avatar Harlan Lieberman-Berg

Bump resync time.

parent 28e63a2e
/*
This is part of WebMU.
Copyright 2016, Harlan Lieberman-Berg <hlieberman@setec.io>
Copyright 2016-2017, Harlan Lieberman-Berg <hlieberman@setec.io>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
......@@ -22,6 +22,7 @@ window.webmu = (function() {
var inputbox;
var conn;
var timer;
var timer_flag;
var history = [];
var historyPos = 0;
var dirtyHistory;
......@@ -43,7 +44,6 @@ window.webmu = (function() {
inputbox = document.getElementById("input-box");
inputbox.onkeypress = pose_input;
timer = window.setInterval(send_ping, 7500);
timer_flag = false;
var n = Notification.requestPermission();
if (n !== undefined) {
n.then(function(r) {
......@@ -116,7 +116,7 @@ window.webmu = (function() {
mainbox.appendChild(a);
mainbox.lastChild.scrollIntoView(true);
} else if (msg.type == "pong") {
timer_flag = false;
timer_flag++;
} else if (msg.type == "sess") {
window.sessionStorage.setItem("sess", msg.id);
} else {
......@@ -180,7 +180,7 @@ window.webmu = (function() {
function send_ping() {
var json = JSON.stringify({"type": "ping"});
if (timer_flag) {
if (timer_flag >= 3) {
handle_hangup("Pong Missed");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment