Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo committed Nov 16, 2022
1 parent 291e8f4 commit 5099616
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions p2p/transport/quic/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,11 @@ func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tp
return nil, err
}

clientConfig := t.clientConfig
clientConfig := t.clientConfig.Clone()
if v == quic.Version1 {
// The endpoint has explicit support for version 1, so we'll only use that version.
clientConfig = t.clientConfig.Clone()
clientConfig.Versions = []quic.VersionNumber{quic.Version1}
} else if v == quic.VersionDraft29 {
clientConfig = t.clientConfig.Clone()
clientConfig.Versions = []quic.VersionNumber{quic.VersionDraft29}
} else {
return nil, errors.New("unknown QUIC version")
Expand Down

0 comments on commit 5099616

Please sign in to comment.