mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
remove use of small buffer
This commit is contained in:
parent
7f277c9bcc
commit
e6a61930d9
@ -53,7 +53,7 @@ func (this *Server) handleUDPPayload(payload *alloc.Buffer, source v2net.Destina
|
||||
}
|
||||
log.Info("Socks: Writing back UDP response with ", payload.Len(), " bytes to ", destination)
|
||||
|
||||
udpMessage := alloc.NewSmallBuffer().Clear()
|
||||
udpMessage := alloc.NewLocalBuffer(2048).Clear()
|
||||
response.Write(udpMessage)
|
||||
|
||||
this.udpMutex.RLock()
|
||||
|
@ -108,7 +108,7 @@ func (this *VMessOutboundHandler) handleRequest(session *encoding.ClientSession,
|
||||
}
|
||||
|
||||
if request.Option.Has(protocol.RequestOptionChunkStream) {
|
||||
err := streamWriter.Write(alloc.NewSmallBuffer().Clear())
|
||||
err := streamWriter.Write(alloc.NewLocalBuffer(32).Clear())
|
||||
if err != nil {
|
||||
conn.SetReusable(false)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user