forked from quic-go/quic-go
introduce Transport.ConnContext, use client's context on the connection (#4507)
* introduce Transport.ConnContext, use client's context on the connection * panic if ConnContext returns nil
This commit is contained in:
@@ -203,8 +203,8 @@ func (h *cryptoSetup) SetLargest1RTTAcked(pn protocol.PacketNumber) error {
|
||||
return h.aead.SetLargestAcked(pn)
|
||||
}
|
||||
|
||||
func (h *cryptoSetup) StartHandshake() error {
|
||||
err := h.conn.Start(context.WithValue(context.Background(), QUICVersionContextKey, h.version))
|
||||
func (h *cryptoSetup) StartHandshake(ctx context.Context) error {
|
||||
err := h.conn.Start(context.WithValue(ctx, QUICVersionContextKey, h.version))
|
||||
if err != nil {
|
||||
return wrapError(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user