1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-30 07:46:41 -04:00
This commit is contained in:
Darien Raymond 2016-11-22 00:42:31 +01:00
parent de414de7a2
commit 13b1bf09cf
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -78,9 +78,11 @@ func (this *BufferedWriter) Flush() error {
}
func (this *BufferedWriter) FlushWithoutLock() error {
fmt.Println("BufferedWriter flushing")
defer this.buffer.Clear()
for !this.buffer.IsEmpty() {
nBytes, err := this.writer.Write(this.buffer.Value)
fmt.Printf("BufferedWriting flushed %d bytes.\n", nBytes)
if err != nil {
return err
}