pull/314/head
Darien Raymond 2016-11-22 00:36:47 +01:00
parent dc0e9aa9b3
commit de414de7a2
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"io" "io"
"sync" "sync"
"fmt"
"v2ray.com/core/common/alloc" "v2ray.com/core/common/alloc"
) )
@ -52,6 +53,8 @@ func (this *BufferedWriter) Write(b []byte) (int, error) {
return 0, io.ErrClosedPipe return 0, io.ErrClosedPipe
} }
fmt.Printf("BufferedWriter writing: %v\n", b)
if !this.cached { if !this.cached {
return this.writer.Write(b) return this.writer.Write(b)
} }
@ -59,6 +62,7 @@ func (this *BufferedWriter) Write(b []byte) (int, error) {
if this.buffer.IsFull() { if this.buffer.IsFull() {
this.FlushWithoutLock() this.FlushWithoutLock()
} }
fmt.Printf("BufferedWriter content: %v\n", this.buffer.Value)
return nBytes, nil return nBytes, nil
} }