From badc77a7f755d9e6124b5a77f8b3d852921b19ca Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Sat, 21 Oct 2017 19:27:20 +0200 Subject: [PATCH] return proper error in drain --- app/proxyman/mux/mux.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/proxyman/mux/mux.go b/app/proxyman/mux/mux.go index 5425416dd..171aa318e 100644 --- a/app/proxyman/mux/mux.go +++ b/app/proxyman/mux/mux.go @@ -187,8 +187,7 @@ func (m *Client) Dispatch(ctx context.Context, outboundRay ray.OutboundRay) bool } func drain(reader io.Reader) error { - buf.Copy(NewStreamReader(reader), buf.Discard) - return nil + return buf.Copy(NewStreamReader(reader), buf.Discard) } func (m *Client) handleStatueKeepAlive(meta *FrameMetadata, reader io.Reader) error {