1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00

fix error handling in mux

This commit is contained in:
Darien Raymond 2018-04-05 20:16:31 +02:00
parent 2b675335bd
commit 435be61661
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
2 changed files with 2 additions and 1 deletions

View File

@ -208,6 +208,7 @@ func (m *Client) handleStatusKeep(meta *FrameMetadata, reader *buf.BufferedReade
s.input.CloseError() s.input.CloseError()
return s.Close() return s.Close()
} }
return nil
} }
return drain(reader) return drain(reader)
} }
@ -368,6 +369,7 @@ func (w *ServerWorker) handleStatusKeep(meta *FrameMetadata, reader *buf.Buffere
s.input.CloseError() s.input.CloseError()
return s.Close() return s.Close()
} }
return nil
} }
return drain(reader) return drain(reader)
} }

View File

@ -77,7 +77,6 @@ func NewStreamReader(reader *buf.BufferedReader) *StreamReader {
// ReadMultiBuffer implmenets buf.Reader. // ReadMultiBuffer implmenets buf.Reader.
func (r *StreamReader) ReadMultiBuffer() (buf.MultiBuffer, error) { func (r *StreamReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
if r.leftOver == 0 { if r.leftOver == 0 {
r.leftOver = -1
return nil, io.EOF return nil, io.EOF
} }