Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(media-server): restore the idle timeout once audio routes start responding

Richie McIlroycb3641f756c4
diff --git a/apps/media-server/src/routes/audio.ts b/apps/media-server/src/routes/audio.ts
index adf57bc54..29245155f 100644
--- a/apps/media-server/src/routes/audio.ts
+++ b/apps/media-server/src/routes/audio.ts
@@ -4,6 +4,7 @@ import { canReadStatus, validateMediaServerSecret } from "../lib/auth";
import {
DRAIN_RETRY_AFTER_SECONDS,
DRAINING_DETAILS,
+ getIdleTimeoutSeconds,
isDraining,
setRequestIdleTimeout,
} from "../lib/lifecycle";
@@ -211,6 +212,10 @@ audio.post("/extract", async (c) => {
},
500,
);
+ } finally {
+ // Only the setup above can sit silent; once bytes flow, a dead client
+ // should be reaped again.
+ setRequestIdleTimeout(c.env, c.req.raw, getIdleTimeoutSeconds());
}
});
@@ -286,6 +291,10 @@ audio.post("/convert", async (c) => {
},
500,
);
+ } finally {
+ // Only the setup above can sit silent; once bytes flow, a dead client
+ // should be reaped again.
+ setRequestIdleTimeout(c.env, c.req.raw, getIdleTimeoutSeconds());
}
});