Allocate new buffer for every package (#2823)

This commit is contained in:
Zoltan Papp 2024-11-01 00:33:25 +01:00 committed by GitHub
parent ad4f0a6fdf
commit 9812de853b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,8 +104,8 @@ func (p *ProxyBind) proxyToLocal(ctx context.Context) {
}
}()
buf := make([]byte, 1500)
for {
buf := make([]byte, 1500)
n, err := p.remoteConn.Read(buf)
if err != nil {
if ctx.Err() != nil {