Skip to content

Commit

Permalink
Merge pull request linkedin#125 from exponea/fix-config-notify-interval
Browse files Browse the repository at this point in the history
Fix handling of Notify.Interval default
  • Loading branch information
Todd Palino authored Aug 26, 2016
2 parents ff0c188 + 6dd9a52 commit 11bb2b6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,11 @@ func ValidateConfig(app *ApplicationContext) error {
}
}

// Notify
if app.Config.Notify.Interval == 0 {
app.Config.Notify.Interval = 10
}

// SMTP server config
if app.Config.Smtp.Server != "" {
if !validateHostname(app.Config.Smtp.Server) {
Expand Down Expand Up @@ -356,11 +361,6 @@ func ValidateConfig(app *ApplicationContext) error {
}
// Username and password are not validated - they're optional

// Notify
if app.Config.Notify.Interval == 0 {
app.Config.Notify.Interval = 10
}

// Email configs
for email, cfg := range app.Config.Emailnotifier {
if !validateEmail(email) {
Expand Down

0 comments on commit 11bb2b6

Please sign in to comment.