From 435be616619fa8c138c993bddb78ce3dcf8775c5 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Thu, 5 Apr 2018 20:16:31 +0200 Subject: [PATCH] fix error handling in mux --- app/proxyman/mux/mux.go | 2 ++ app/proxyman/mux/reader.go | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/proxyman/mux/mux.go b/app/proxyman/mux/mux.go index 1a35929c..25c26a65 100644 --- a/app/proxyman/mux/mux.go +++ b/app/proxyman/mux/mux.go @@ -208,6 +208,7 @@ func (m *Client) handleStatusKeep(meta *FrameMetadata, reader *buf.BufferedReade s.input.CloseError() return s.Close() } + return nil } return drain(reader) } @@ -368,6 +369,7 @@ func (w *ServerWorker) handleStatusKeep(meta *FrameMetadata, reader *buf.Buffere s.input.CloseError() return s.Close() } + return nil } return drain(reader) } diff --git a/app/proxyman/mux/reader.go b/app/proxyman/mux/reader.go index 4c543297..5cc843ad 100644 --- a/app/proxyman/mux/reader.go +++ b/app/proxyman/mux/reader.go @@ -77,7 +77,6 @@ func NewStreamReader(reader *buf.BufferedReader) *StreamReader { // ReadMultiBuffer implmenets buf.Reader. func (r *StreamReader) ReadMultiBuffer() (buf.MultiBuffer, error) { if r.leftOver == 0 { - r.leftOver = -1 return nil, io.EOF }