We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8c1059 commit 11edf6bCopy full SHA for 11edf6b
connstate/conn.go
@@ -63,7 +63,10 @@ func ListenConnState(conn net.Conn) (ConnStater, error) {
63
})
64
if fd != nil {
65
if err != nil && opAddErr == nil {
66
- _ = poll.control(fd, opDel)
+ // if rawConn is closed, poller will delete the fd by itself
67
+ _ = rawConn.Control(func(_ uintptr) {
68
+ _ = poll.control(fd, opDel)
69
+ })
70
}
71
if err != nil || opAddErr != nil {
72
atomic.StorePointer(&fd.conn, nil)
0 commit comments