Skip to content

Commit 2fc7424

Browse files
committed
Fix request buffer
(cherry picked from commit c1a0b6c)
1 parent 88ebc6b commit 2fc7424

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ func (s *Service[U]) NewConnection(ctx context.Context, conn net.Conn, source M.
337337
return err
338338
}
339339
if !legacyProtocol && requestBuffer.Len() > 0 {
340-
reader = bufio.NewCachedReader(reader, requestBuffer)
340+
reader = bufio.NewCachedReader(reader, requestBuffer.ToOwned())
341341
}
342342
reader = CreateReader(reader, nil, requestBodyKey, requestBodyNonce, requestBodyKey, requestBodyNonce, security, option)
343343
if option&RequestOptionChunkStream != 0 && command == CommandTCP || command == CommandMux {

0 commit comments

Comments
 (0)