Stability improvements

This commit is contained in:
Samuel Sloniker 2021-07-10 14:28:36 -07:00
parent 1fc8aa4505
commit 9dc8030d86
2 changed files with 3 additions and 2 deletions

View File

@ -26,6 +26,7 @@ function setup() {
type = e.data.split('%')[0]
if (type == 'ver') {
ws.send('pass ' + localStorage.getItem('password'))
setInterval(function(){ws.send('ack')}, 3000)
} else if ( type == 'pic' ) {
pos = e.data.split('%')[1]
x = Number(pos.split('x')[0])
@ -67,7 +68,6 @@ function setup() {
ws.onopen = function(e) {
ws.send('maxver 1')
}
setInterval(function(){ws.send('ack')}, 3000)
}

View File

@ -108,6 +108,8 @@ class HCRAServer(tornado.websocket.WebSocketHandler):
self.close()
return
self.has_auth = True
try:
self.client = Client(self)
except DisconnectError as e:
@ -129,7 +131,6 @@ class HCRAServer(tornado.websocket.WebSocketHandler):
self.is_open = True
self.client.ack()
self.has_auth = True
else:
if action == 'ack':
self.client.good = True