feat(idlesleep): support idlesleep for stream routes, rewritten and fixed stream implementation

This commit is contained in:
yusing
2025-06-09 22:20:26 +08:00
parent 25fbcc4ab9
commit b5328fe5e7
16 changed files with 659 additions and 430 deletions

View File

@@ -92,7 +92,7 @@ func (w *Watcher) wakeFromHTTP(rw http.ResponseWriter, r *http.Request) (shouldN
}
ctx := r.Context()
if w.cancelled(ctx) {
if w.canceled(ctx) {
w.redirectToStartEndpoint(rw, r)
return false
}
@@ -107,7 +107,7 @@ func (w *Watcher) wakeFromHTTP(rw http.ResponseWriter, r *http.Request) (shouldN
for {
w.resetIdleTimer()
if w.cancelled(ctx) {
if w.canceled(ctx) {
w.redirectToStartEndpoint(rw, r)
return false
}