diff --git a/client.go b/client.go index 76b5906130a..3d7f15059fe 100644 --- a/client.go +++ b/client.go @@ -42,10 +42,8 @@ type client struct { logger utils.Logger } -var ( - // make it possible to mock connection ID for initial generation in the tests - generateConnectionIDForInitial = protocol.GenerateConnectionIDForInitial -) +// make it possible to mock connection ID for initial generation in the tests +var generateConnectionIDForInitial = protocol.GenerateConnectionIDForInitial // DialAddr establishes a new QUIC connection to a server. // It uses a new UDP connection and closes this connection when the QUIC connection is closed. diff --git a/config.go b/config.go index b9f32e422a7..0e8cc98a59a 100644 --- a/config.go +++ b/config.go @@ -51,12 +51,12 @@ func populateServerConfig(config *Config) *Config { // populateClientConfig populates fields in the quic.Config with their default values, if none are set // it may be called with nil func populateClientConfig(config *Config, createdPacketConn bool) *Config { - var defaultConnIdLen = protocol.DefaultConnectionIDLength + defaultConnIDLen := protocol.DefaultConnectionIDLength if createdPacketConn { - defaultConnIdLen = 0 + defaultConnIDLen = 0 } - config = populateConfig(config, defaultConnIdLen) + config = populateConfig(config, defaultConnIDLen) return config } diff --git a/interface.go b/interface.go index 60918352919..c400f986048 100644 --- a/interface.go +++ b/interface.go @@ -206,7 +206,6 @@ type EarlyConnection interface { // // Connection IDs generated by an implementation should always produce IDs of constant size. type ConnectionIDGenerator interface { - // GenerateConnectionID generates a new ConnectionID. // Generated ConnectionIDs should be unique and observers should not be able to correlate two ConnectionIDs. GenerateConnectionID() ([]byte, error)