refactor(measurexlite): make buffered channels private (#864)

Closes https://github.com/ooni/probe/issues/2215
This commit is contained in:
DecFox 2022-08-17 23:40:48 +05:30 committed by GitHub
commit e1d014e826
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 326 additions and 51 deletions

View file

@ -141,7 +141,7 @@ func (m *Measurer) tcpConnect(ctx context.Context, index int64,
ol.Stop(err)
measurexlite.MaybeClose(conn)
sp := &SinglePing{
TCPConnect: <-trace.TCPConnect,
TCPConnect: trace.FirstTCPConnectOrNil(), // record the first connect from the buffer
}
return sp
}