Return timeout in waitForChunk

monorepo
Varun Patil 2022-11-11 18:18:16 -08:00
parent 7764a70471
commit ae1c4ae682
1 changed files with 3 additions and 0 deletions

View File

@ -246,6 +246,9 @@ func (s *Stream) waitForChunk(w http.ResponseWriter, chunk *Chunk) {
if chunk.done { if chunk.done {
s.returnChunk(w, chunk) s.returnChunk(w, chunk)
} }
// Return timeout error
w.WriteHeader(http.StatusRequestTimeout)
} }
func (s *Stream) restartAtChunk(w http.ResponseWriter, id int) { func (s *Stream) restartAtChunk(w http.ResponseWriter, id int) {