Update latency check timeout

This commit is contained in:
giongto35 2019-09-09 22:36:47 +08:00
parent 719d9c8228
commit de87d10e66

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