mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-10 03:40:24 +08:00
优化并发读写限制
This commit is contained in:
@@ -314,8 +314,9 @@ func (this *FileReader) ReadBodyRange(buf []byte, start int64, end int64, callba
|
||||
}
|
||||
|
||||
for {
|
||||
var n int
|
||||
fsutils.ReaderLimiter.Ack()
|
||||
n, err := this.fp.Read(buf)
|
||||
n, err = this.fp.Read(buf)
|
||||
fsutils.ReaderLimiter.Release()
|
||||
if n > 0 {
|
||||
var n2 = int(end-offset) + 1
|
||||
|
||||
Reference in New Issue
Block a user