testutils: change ListenerWrapper to push the most recently accepted connection (#7772)

This commit is contained in:
Easwar Swaminathan 2024-10-25 11:33:47 -07:00 committed by GitHub
parent e0a730c111
commit a82315c00f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ func (l *ListenerWrapper) Accept() (net.Conn, error) {
}
closeCh := NewChannel()
conn := &ConnWrapper{Conn: c, CloseCh: closeCh}
l.NewConnCh.Send(conn)
l.NewConnCh.Replace(conn)
return conn, nil
}