mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
Fix another dead lock in buffered writer
This commit is contained in:
@@ -70,10 +70,11 @@ func (this *BufferedWriter) SetCached(cached bool) {
|
||||
}
|
||||
|
||||
func (this *BufferedWriter) Release() {
|
||||
this.Flush()
|
||||
|
||||
this.Lock()
|
||||
defer this.Unlock()
|
||||
|
||||
this.Flush()
|
||||
this.buffer.Release()
|
||||
this.buffer = nil
|
||||
this.writer = nil
|
||||
|
||||
Reference in New Issue
Block a user