mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-10 12:00:28 +08:00
优化代码
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/TeaOSLab/EdgeNode/internal/goman"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/remotelogs"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/rpc"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/bytepool"
|
||||
connutils "github.com/TeaOSLab/EdgeNode/internal/utils/conns"
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
"io"
|
||||
@@ -246,9 +246,9 @@ func (this *HTTPCacheTaskManager) fetchKey(key *pb.HTTPCacheTaskKey) error {
|
||||
}
|
||||
|
||||
// 读取内容,以便于生成缓存
|
||||
var buf = utils.BytePool16k.Get()
|
||||
var buf = bytepool.Pool16k.Get()
|
||||
_, err = io.CopyBuffer(io.Discard, resp.Body, buf.Bytes)
|
||||
utils.BytePool16k.Put(buf)
|
||||
bytepool.Pool16k.Put(buf)
|
||||
if err != nil {
|
||||
if err != io.EOF {
|
||||
err = this.simplifyErr(err)
|
||||
|
||||
Reference in New Issue
Block a user