mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-07-18 17:38:07 +08:00
fix: crypt: file already closed; net: concurrent download deadlock
This commit is contained in:
@ -28,7 +28,7 @@ type Addition struct {
|
||||
var config = driver.Config{
|
||||
Name: "Crypt",
|
||||
LocalSort: true,
|
||||
OnlyLocal: false,
|
||||
OnlyLocal: true,
|
||||
OnlyProxy: true,
|
||||
NoCache: true,
|
||||
NoUpload: false,
|
||||
|
@ -663,15 +663,15 @@ func (br *Buf) Read(p []byte) (n int, err error) {
|
||||
} else {
|
||||
err = io.ErrClosedPipe
|
||||
}
|
||||
br.rw.Unlock()
|
||||
if err != nil && err != io.EOF {
|
||||
br.rw.Unlock()
|
||||
return
|
||||
}
|
||||
if n > 0 {
|
||||
br.off += n
|
||||
br.rw.Unlock()
|
||||
return n, nil
|
||||
}
|
||||
br.rw.Lock()
|
||||
br.readPending = true
|
||||
br.rw.Unlock()
|
||||
// n==0, err==io.EOF
|
||||
|
Reference in New Issue
Block a user