fix: resolve heartbeat race condition causing session stalls (#155)
This fixes a race condition where the client watchdog timeout (25s) was shorter than the server heartbeat interval (30s).
Changes:
- Server: Decreased heartbeat interval from 30s to 15s to send keepalives more frequently.
- Client: Increased stale connection threshold from 25s to 45s to allow for 3 missed heartbeats before reconnecting.
This ensures stable connections during long subagent tasks where no text generation occurs.
Co-authored-by: OpenCode Test <test@opencode.ai>
This commit is contained in:
committed by
GitHub
co-authored by
OpenCode Test
parent
1be5dfda05
commit
80227be746
@@ -1675,7 +1675,7 @@ export const useEventStream = () => {
|
||||
if (hasBusySessions) {
|
||||
void refreshSessionActivityStatus();
|
||||
}
|
||||
if (now - lastEventTimestampRef.current > 25000) {
|
||||
if (now - lastEventTimestampRef.current > 45000) {
|
||||
Promise.resolve().then(async () => {
|
||||
try {
|
||||
const healthy = await opencodeClient.checkHealth();
|
||||
|
||||
Reference in New Issue
Block a user