Skip to content

Commit 493ebbe

Browse files
authoredJul 5, 2020
netconn.go: Prevent timer leakage (#255)
Closes #243
1 parent 15a1523 commit 493ebbe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎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)
Please sign in to comment.