forked from quic-go/quic-go
simplify content storage in packed packets
It's not necessary to store both the packetBuffer and the slice containing the raw data in the packet.
This commit is contained in:
@@ -494,7 +494,7 @@ func (s *baseServer) sendServerBusy(remoteAddr net.Addr, hdr *wire.Header) error
|
||||
sealer, _ := handshake.NewInitialAEAD(hdr.DestConnectionID, protocol.PerspectiveServer)
|
||||
packetBuffer := getPacketBuffer()
|
||||
defer packetBuffer.Release()
|
||||
buf := bytes.NewBuffer(packetBuffer.Slice[:0])
|
||||
buf := bytes.NewBuffer(packetBuffer.Data)
|
||||
|
||||
ccf := &wire.ConnectionCloseFrame{ErrorCode: qerr.ServerBusy}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user