WebsocketPie icon indicating copy to clipboard operation
WebsocketPie copied to clipboard

PieServer-bun auto times out after 2 minutes

Open jdoleary opened this issue 3 months ago • 0 comments

PieClient should send messages to prevent idle timeout

setInterval(() => {
        if (pie.isConnected() && pie.currentRoomInfo) {
            // Keep connection alive.  Bun's websocket server has a 2 minute timeout
            console.debug('Send empty message to keep connection from idle timeouting');
            pie.sendData({
                type: 'PREVENT_IDLE_TIMEOUT',
            });
        }
    }, 60_000);

jdoleary avatar Nov 25 '24 14:11 jdoleary