diff --git a/u_conn.go b/u_conn.go index 8668533..cc1f12d 100644 --- a/u_conn.go +++ b/u_conn.go @@ -587,14 +587,12 @@ func (uconn *UConn) MarshalClientHello() error { return fmt.Errorf("sni extension missing while attempting ECH") } - oldSNI := uconn.Extensions[sniExtIdex] uconn.Extensions[sniExtIdex] = &SNIExtension{ ServerName: string(ech.config.PublicName), } uconn.computeAndUpdateOuterECHExtension(inner, ech, true) - uconn.Extensions[sniExtIdex] = oldSNI uconn.echCtx = ech return nil }