Skip to content

Commit

Permalink
release buffer in error case
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Feb 20, 2019
1 parent da8efb4 commit 8d09d74
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/net/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 8d09d74

Please sign in to comment.