Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions netconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,13 @@ type netConn struct {

var _ net.Conn = &netConn{}

func (nc *netConn) Close() error {
func (nc *netConn) Close() (err error) {
err = nc.c.Close(StatusNormalClosure, "")
nc.writeTimer.Stop()
nc.writeCancel()
nc.readTimer.Stop()
nc.readCancel()
return nc.c.Close(StatusNormalClosure, "")
return err
}

func (nc *netConn) Write(p []byte) (int, error) {
Expand Down