From ae1c4ae6823197c211b66b908912b324270e2247 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 11 Nov 2022 18:18:16 -0800 Subject: [PATCH] Return timeout in waitForChunk --- stream.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stream.go b/stream.go index b77e4f2a..0a24656c 100644 --- a/stream.go +++ b/stream.go @@ -246,6 +246,9 @@ func (s *Stream) waitForChunk(w http.ResponseWriter, chunk *Chunk) { if chunk.done { s.returnChunk(w, chunk) } + + // Return timeout error + w.WriteHeader(http.StatusRequestTimeout) } func (s *Stream) restartAtChunk(w http.ResponseWriter, id int) {