implement generic Min and Max functions

This commit is contained in:
Marten Seemann
2022-07-25 16:10:36 -04:00
parent 424325af58
commit 43bde14cf7
28 changed files with 103 additions and 258 deletions

View File

@@ -16,7 +16,7 @@ func (c *Config) Clone() *Config {
}
func (c *Config) handshakeTimeout() time.Duration {
return utils.MaxDuration(protocol.DefaultHandshakeTimeout, 2*c.HandshakeIdleTimeout)
return utils.Max(protocol.DefaultHandshakeTimeout, 2*c.HandshakeIdleTimeout)
}
func validateConfig(config *Config) error {