From ee72865f48e02cb21195b5a88bc04ae7bae53dde Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> Date: Wed, 22 Jul 2020 20:29:39 +0800 Subject: [PATCH] Fix: recycle buf on http obfs --- component/simple-obfs/http.go | 1 + 1 file changed, 1 insertion(+) diff --git a/component/simple-obfs/http.go b/component/simple-obfs/http.go index 11894357..a06bad23 100644 --- a/component/simple-obfs/http.go +++ b/component/simple-obfs/http.go @@ -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