Fixed SSE error after export (Safari)
This commit is contained in:
@ -64,7 +64,7 @@ function handleUpdateMessage(src, message) {
|
|||||||
console.log("%cfrom server (SSE): " + message.type,
|
console.log("%cfrom server (SSE): " + message.type,
|
||||||
"color:white;background:lightgray", message);
|
"color:white;background:lightgray", message);
|
||||||
}
|
}
|
||||||
|
// console.log(message.type, "at", new Date())
|
||||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
// <---------------------------------------------------------------------------------BUG!!!
|
// <---------------------------------------------------------------------------------BUG!!!
|
||||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
@ -292,6 +292,7 @@ function exportCallback(selectedVariables, startDateTimeMs, endDateTimeMs, nan,
|
|||||||
let exportURL = "http://" + hostPort + "/export?time=" + startDateTimeMs/1000 + "," + endDateTimeMs/1000 + "&variables=" + selectedVariables + "&nan=" + nan + "&interval=" + binningParam + "&id=" + clientID
|
let exportURL = "http://" + hostPort + "/export?time=" + startDateTimeMs/1000 + "," + endDateTimeMs/1000 + "&variables=" + selectedVariables + "&nan=" + nan + "&interval=" + binningParam + "&id=" + clientID
|
||||||
let a = document.createElement('a');
|
let a = document.createElement('a');
|
||||||
a.href = exportURL
|
a.href = exportURL
|
||||||
|
a.download = true
|
||||||
a.click()
|
a.click()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,8 +92,10 @@ def get_update(path=None):
|
|||||||
lastmsg = time.time()
|
lastmsg = time.time()
|
||||||
else:
|
else:
|
||||||
gevent.sleep(0.5)
|
gevent.sleep(0.5)
|
||||||
except (GeneratorExit, tcp_lineserver.Disconnected):
|
except (GeneratorExit, tcp_lineserver.Disconnected) as e:
|
||||||
|
logging.info("except clause %r", repr(e))
|
||||||
logging.info('CLOSED %s', client.id)
|
logging.info('CLOSED %s', client.id)
|
||||||
|
print('CLOSE client')
|
||||||
instrument.remove(client)
|
instrument.remove(client)
|
||||||
pass
|
pass
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Reference in New Issue
Block a user