소스 검색

release buffer in error case

Darien Raymond 7 년 전
부모
커밋
8d09d74224
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      common/net/connection.go

+ 1 - 0
common/net/connection.go

@@ -117,6 +117,7 @@ func (c *connection) Write(b []byte) (int, error) {
 
 func (c *connection) WriteMultiBuffer(mb buf.MultiBuffer) error {
 	if c.done.Done() {
+		buf.ReleaseMulti(mb)
 		return io.ErrClosedPipe
 	}