diff --git a/main.go b/main.go index 0a13ed4..3f80852 100644 --- a/main.go +++ b/main.go @@ -143,11 +143,11 @@ func upstreamFiber(name string) { })() body := r.Body for { - buff := make([]byte, 65536) if ctx.viewer == 0 { fmt.Printf("No active viewers for %s, stopping reading from upstream.\n", name) break } + buff := make([]byte, 65536) n, err := body.Read(buff) if err != nil { fmt.Fprintf(os.Stderr, "Upstream for stream %s request reached EOF\n", name)