Best-effort DELETE of the caller's session row, gated on actually holding * one. Used both by exit paths and any flow that wants the next POST to * start clean (rejoin, return-to-landing). Always swallows errors — the * server-side sweep is the backstop.
()
| 253 | * start clean (rejoin, return-to-landing). Always swallows errors — the |
| 254 | * server-side sweep is the backstop. */ |
| 255 | async function releaseFreebuffSlot(): Promise<void> { |
| 256 | const current = useFreebuffSessionStore.getState().session |
| 257 | if (!shouldReleaseSlot(current)) return |
| 258 | const { token } = getAuthTokenDetails() |
| 259 | if (!token) return |
| 260 | try { |
| 261 | await callSession('DELETE', token) |
| 262 | } catch { |
| 263 | // swallow |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | async function resetChatStore(): Promise<void> { |
| 268 | const { useChatStore } = await import('../state/chat-store') |
no test coverage detected