Skip to content

Commit a34d1f9

Browse files
Use Next instead of io.Discard to skip header
1 parent 8d833b8 commit a34d1f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

protocol.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func (p *Conn) readHeader() error {
300300
header, err := Read(br)
301301

302302
if err == nil {
303-
_, err = io.CopyN(io.Discard, bb, int64(bb.Len()-br.Buffered()))
303+
_ = bb.Next(bb.Len() - br.Buffered())
304304
}
305305

306306
if bb.Len() == 0 {

0 commit comments

Comments
 (0)