From dd521623dfc34b6dead7c86026a41ef0572fe991 Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Mon, 23 Sep 2024 13:19:54 +0000 Subject: [PATCH] fix: cancel netconn contexts after close handshake --- netconn.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/netconn.go b/netconn.go index b118e4d3..dccd611f 100644 --- a/netconn.go +++ b/netconn.go @@ -115,10 +115,12 @@ type netConn struct { var _ net.Conn = &netConn{} func (nc *netConn) Close() error { - nc.writeTimer.Stop() - nc.writeCancel() - nc.readTimer.Stop() - nc.readCancel() + defer func() { + nc.writeTimer.Stop() + nc.writeCancel() + nc.readTimer.Stop() + nc.readCancel() + }() return nc.c.Close(StatusNormalClosure, "") } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy