1
0
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:
v2ray 2016-07-29 23:18:58 +02:00
parent 7f277c9bcc
commit e6a61930d9
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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)
}