mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-21 09:08:57 +00:00
Update latency check timeout
This commit is contained in:
parent
1fd5b1b2ea
commit
f7f085dff9
1 changed files with 1 additions and 1 deletions
2
static/js/ws.js
vendored
2
static/js/ws.js
vendored
|
|
@ -96,7 +96,7 @@ conn.onmessage = e => {
|
|||
// TODO: Clean code, use async
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
xmlHttp.open( "GET", "http://"+addr+":9000/echo?_=" + beforeTime, true ); // false for synchronous request, add date to not calling cache
|
||||
xmlHttp.timeout = 1000
|
||||
xmlHttp.timeout = 2000
|
||||
xmlHttp.ontimeout = () => {
|
||||
cntResp++;
|
||||
afterTime = Date.now();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue