Update latency check timeout

This commit is contained in:
giongto35 2019-09-09 22:36:47 +08:00
parent 1fd5b1b2ea
commit f7f085dff9

2
static/js/ws.js vendored
View file

@ -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();