mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
remove unused bufferpool
This commit is contained in:
parent
dd2f5b5a12
commit
c1c39a5a1f
1 changed files with 4 additions and 13 deletions
|
|
@ -4,7 +4,6 @@ import (
|
|||
"fmt"
|
||||
"ghproxy/config"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
httpc "github.com/satomitouka/touka-httpc"
|
||||
|
|
@ -15,7 +14,6 @@ var BufferSize int = 32 * 1024 // 32KB
|
|||
var (
|
||||
tr *http.Transport
|
||||
gittr *http.Transport
|
||||
BufferPool *sync.Pool
|
||||
client *httpc.Client
|
||||
gitclient *httpc.Client
|
||||
)
|
||||
|
|
@ -25,13 +23,6 @@ func InitReq(cfg *config.Config) {
|
|||
if cfg.GitClone.Mode == "cache" {
|
||||
initGitHTTPClient(cfg)
|
||||
}
|
||||
|
||||
// 初始化固定大小的缓存池
|
||||
BufferPool = &sync.Pool{
|
||||
New: func() interface{} {
|
||||
return make([]byte, BufferSize)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func initHTTPClient(cfg *config.Config) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue