mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
Fix dead lock in buffered writer
This commit is contained in:
parent
ec610494ea
commit
e00c424341
@ -35,10 +35,7 @@ func (this *BufferedWriter) Write(b []byte) (int, error) {
|
||||
}
|
||||
nBytes, _ := this.buffer.Write(b)
|
||||
if this.buffer.IsFull() {
|
||||
err := this.Flush()
|
||||
if err != nil {
|
||||
return nBytes, err
|
||||
}
|
||||
go this.Flush()
|
||||
}
|
||||
return nBytes, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user