mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
Fix: recycle buf on http obfs
This commit is contained in:
parent
2875910f01
commit
efdb7ed43a
|
@ -28,6 +28,7 @@ func (ho *HTTPObfs) Read(b []byte) (int, error) {
|
|||
n := copy(b, ho.buf[ho.offset:])
|
||||
ho.offset += n
|
||||
if ho.offset == len(ho.buf) {
|
||||
pool.Put(ho.buf)
|
||||
ho.buf = nil
|
||||
}
|
||||
return n, nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user