Commit 01bf6356 authored by Julian's avatar Julian
Browse files

decrease ping time

parent 038bc1af
......@@ -297,6 +297,7 @@ function handleSSE(req, res) {
'Access-Control-Allow-Origin': "*",
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept, Last-Event-ID'
});
res.write("data: " + JSON.stringify({"ping": true}) + "\n\n");
sseClients[sseClientId] = res;
((currentId) => {
......@@ -399,4 +400,4 @@ server.listen(process.env.SPACE_PORT || 3000, () => {
setInterval((() => {
updateSSE({"ping": true});
}), 10000);
}), 5000);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment