[fix](trx-frontend-http): compress images and fix SSE heartbeat timing
Resize favicon from 1024x1024 to 64x64 and logo from 1024x1024 to 256x256, reducing total image size from ~3 MB to ~70 KB. Fix SSE heartbeat race condition where the 10s ping interval competed with the 8s stale threshold, causing spurious reconnects. Now pings every 5s server-side, with a 15s stale threshold and 5s check interval client-side. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
@@ -289,11 +289,11 @@ es.onmessage = (evt) => {
|
||||
|
||||
esHeartbeat = setInterval(() => {
|
||||
const now = Date.now();
|
||||
if (now - lastEventAt > 8000) {
|
||||
if (now - lastEventAt > 15000) {
|
||||
es.close();
|
||||
connect();
|
||||
}
|
||||
}, 4000);
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
async function postPath(path) {
|
||||
|
||||
Reference in New Issue
Block a user