内容压缩增加繁忙(busy)检测

This commit is contained in:
GoEdgeLab
2024-04-17 08:36:14 +08:00
parent 1e24eceee9
commit e7b70dd9b3
7 changed files with 58 additions and 28 deletions

View File

@@ -4,7 +4,6 @@ package compressions
import (
teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
"github.com/andybalholm/brotli"
"io"
)
@@ -15,7 +14,7 @@ func init() {
return
}
sharedBrotliWriterPool = NewWriterPool(CalculatePoolSize(), brotli.BestCompression, func(writer io.Writer, level int) (Writer, error) {
sharedBrotliWriterPool = NewWriterPool(CalculatePoolSize(), func(writer io.Writer, level int) (Writer, error) {
return newBrotliWriter(writer)
})
}