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

@ -182,7 +182,7 @@ func (m *Measurer) quicHandshake(ctx context.Context, index int64,
}
_, err := dialer.DialContext(ctx, "udp", address, tlsConfig, &quic.Config{})
ol.Stop(err)
sp.QUICHandshake = <-trace.QUICHandshake
sp.QUICHandshake = trace.FirstQUICHandshakeOrNil() // record the first handshake from the buffer
sp.NetworkEvents = append(sp.NetworkEvents, trace.NetworkEvents()...)
return sp
}