From 9d1428fde00edb394bacb22a2799384558db770e Mon Sep 17 00:00:00 2001 From: devbeni Date: Fri, 19 Sep 2025 19:22:15 +0200 Subject: [PATCH] fix: update estimated wait time calculation in queue updates --- app/api/socketio/route.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/socketio/route.js b/app/api/socketio/route.js index f0575e7..e7e33a1 100644 --- a/app/api/socketio/route.js +++ b/app/api/socketio/route.js @@ -45,7 +45,7 @@ function broadcastUpdate(eventId, io) { io.to(sid).emit("queue_update", { activeCount: ev.sockets.size, position: pos === -1 ? null : pos + 1, - estimatedWait: pos === -1 ? null : ev.queue.length * 5, + estimatedWait: pos === -1 ? null : pos * TOKEN_TTL_SECONDS, }) } } @@ -226,7 +226,7 @@ export async function GET(req) { io.to(socket.id).emit("queue_update", { activeCount: ev.sockets.size, position: pos === -1 ? null : pos + 1, - estimatedWait: pos === -1 ? null : ev.queue.length * 5, + estimatedWait: pos === -1 ? null : pos * TOKEN_TTL_SECONDS, }) })