refactor(simplequicping): use step-by-step (#852)
See https://github.com/ooni/probe/issues/2159 and https://github.com/ooni/spec/pull/254
This commit is contained in:
parent
fbd7cd2b7e
commit
69602abe8a
16 changed files with 922 additions and 26 deletions
|
|
@ -134,8 +134,14 @@ func (d *quicDialerQUICGo) DialContext(ctx context.Context, network string,
|
|||
return nil, err
|
||||
}
|
||||
tlsConfig = d.maybeApplyTLSDefaults(tlsConfig, udpAddr.Port)
|
||||
trace := ContextTraceOrDefault(ctx)
|
||||
started := trace.TimeNow()
|
||||
trace.OnQUICHandshakeStart(started, address, quicConfig)
|
||||
qconn, err := d.dialEarlyContext(
|
||||
ctx, pconn, udpAddr, address, tlsConfig, quicConfig)
|
||||
finished := trace.TimeNow()
|
||||
err = MaybeNewErrWrapper(ClassifyQUICHandshakeError, QUICHandshakeOperation, err)
|
||||
trace.OnQUICHandshakeDone(started, address, qconn, tlsConfig, err, finished)
|
||||
if err != nil {
|
||||
pconn.Close() // we own it on failure
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Reference in a new issue