fix: Resolve the error in reading container logs (#8965)

This commit is contained in:
CityFun 2025-06-09 13:37:04 +08:00 committed by GitHub
parent 46a2c3f81b
commit ed2e305508
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -945,7 +945,7 @@ func collectLogs(params dto.StreamLog, messageChan chan<- string, errorChan chan
message := scanner.Text()
select {
case messageChan <- message:
case <-time.After(time.Second):
case <-time.After(5 * time.Second):
errorChan <- fmt.Errorf("message channel blocked")
return
}