소스 검색

Fix another dead lock in buffered writer

v2ray 9 년 전
부모
커밋
3d6200dc64
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      common/io/buffered_writer.go

+ 2 - 1
common/io/buffered_writer.go

@@ -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