|  | @@ -3,8 +3,6 @@ package io
 | 
	
		
			
				|  |  |  import (
 | 
	
		
			
				|  |  |  	"io"
 | 
	
		
			
				|  |  |  	"sync"
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	"fmt"
 | 
	
		
			
				|  |  |  	"v2ray.com/core/common/alloc"
 | 
	
		
			
				|  |  |  )
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -53,8 +51,6 @@ func (this *BufferedWriter) Write(b []byte) (int, error) {
 | 
	
		
			
				|  |  |  		return 0, io.ErrClosedPipe
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	fmt.Printf("BufferedWriter writing: %v\n", b)
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  	if !this.cached {
 | 
	
		
			
				|  |  |  		return this.writer.Write(b)
 | 
	
		
			
				|  |  |  	}
 | 
	
	
		
			
				|  | @@ -62,7 +58,6 @@ func (this *BufferedWriter) Write(b []byte) (int, error) {
 | 
	
		
			
				|  |  |  	if this.buffer.IsFull() {
 | 
	
		
			
				|  |  |  		this.FlushWithoutLock()
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  | -	fmt.Printf("BufferedWriter content: %v\n", this.buffer.Value)
 | 
	
		
			
				|  |  |  	return nBytes, nil
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -78,11 +73,9 @@ 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
 | 
	
		
			
				|  |  |  		}
 |