Skip to content

Commit 5cac90d

Browse files
committed
netconn: Prevent timer leakage
Closes #243
1 parent 15a1523 commit 5cac90d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: netconn.go

+2
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ type netConn struct {
106106
var _ net.Conn = &netConn{}
107107

108108
func (nc *netConn) Close() error {
109+
nc.writeTimer.Stop()
110+
nc.readTimer.Stop()
109111
return nc.c.Close(StatusNormalClosure, "")
110112
}
111113

0 commit comments

Comments
 (0)