From 214848975b154d28521dee4d82d02f2f0eda0ce7 Mon Sep 17 00:00:00 2001 From: Florian Loitsch Date: Tue, 16 Jan 2024 10:32:31 +0400 Subject: [PATCH] Handle disconnects correctly. We weren't getting disconnect errors. --- cmd/jag/commands/proxy_multiplexed_reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/jag/commands/proxy_multiplexed_reader.go b/cmd/jag/commands/proxy_multiplexed_reader.go index 6d14de62..098a3f5d 100644 --- a/cmd/jag/commands/proxy_multiplexed_reader.go +++ b/cmd/jag/commands/proxy_multiplexed_reader.go @@ -33,9 +33,9 @@ func multiplexReader(input io.Reader) (reader1, reader2 io.Reader) { for { count, err := input.Read(chunk) if err != nil { + errc <- err ch1 <- nil ch2 <- nil - errc <- err return } acc = append(acc, chunk[:count]...)