fix(idlewatcher): improve container readiness handling in wakeFromHTTP

- Updated the wakeFromHTTP method to send a 100 Continue response to prevent client wait-header timeout.
- Implemented logic for non-HTML requests to wait for the container to become ready, returning an error message if it times out, or redirecting if successful.
- Adjusted the waitForReady method to return true upon receiving a ready notification.
This commit is contained in:
yusing
2025-12-17 10:15:31 +08:00
parent b783ded2e7
commit 37e72cda57
3 changed files with 10 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ func (w *Watcher) waitForReady(ctx context.Context) bool {
// Wait for ready notification or context cancellation
select {
case <-w.readyNotifyCh:
return w.ready() // double-check in case of race condition
return true
case <-ctx.Done():
return false
}