Skip to content

Commit 973d861

Browse files
committed
netutil: fix a buglet
I was noticing an excess number of conn objects remaining open after a test shutdown. Release note: None
1 parent 310951b commit 973d861

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/util/netutil/net.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ func (s *TCPServer) ServeWith(
191191
serveConn(ctx, rw)
192192
})
193193
if err != nil {
194+
err = errors.CombineErrors(err, rw.Close())
194195
return err
195196
}
196197
}

0 commit comments

Comments
 (0)