Stability improvements
This commit is contained in:
parent
1fc8aa4505
commit
9dc8030d86
|
@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user