Skip to content

Commit

Permalink
only check KeepAliveInterval if keep-alives are enabled (#113)
Browse files Browse the repository at this point in the history
Signed-off-by: Asutorufa <16442314+Asutorufa@users.noreply.github.com>
  • Loading branch information
Asutorufa committed Dec 2, 2023
1 parent f03ed39 commit 828214b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func VerifyConfig(config *Config) error {
if config.AcceptBacklog <= 0 {
return fmt.Errorf("backlog must be positive")
}
if config.KeepAliveInterval == 0 {
if config.EnableKeepAlive && config.KeepAliveInterval == 0 {
return fmt.Errorf("keep-alive interval must be positive")
}
if config.MeasureRTTInterval == 0 {
Expand Down

0 comments on commit 828214b

Please sign in to comment.