소스 검색

small fixes

Darien Raymond 9 년 전
부모
커밋
65a49e7fa0
2개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      app/proxy/proxy.go
  2. 0 1
      proxy/vmess/outbound/outbound.go

+ 1 - 1
app/proxy/proxy.go

@@ -92,7 +92,7 @@ func (this *ProxyConnection) Read(b []byte) (int, error) {
 
 func (this *ProxyConnection) Write(b []byte) (int, error) {
 	if this.closed {
-		return 0, errors.New("Proxy|Outbound: Writing into closed connection.")
+		return 0, io.ErrClosedPipe
 	}
 	return this.writer.Write(b)
 }

+ 0 - 1
proxy/vmess/outbound/outbound.go

@@ -157,7 +157,6 @@ func (this *VMessOutboundHandler) handleResponse(session *encoding.ClientSession
 	}
 
 	bodyReader.Release()
-
 	return
 }