mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
NTP out of sync prompt fix if logger is disabled (#340)
* Add check to see if logger is enabled * don't need an explicit true check here * removed line
This commit is contained in:
2
main.go
2
main.go
@@ -223,7 +223,7 @@ func ActivateNTP() {
|
||||
configNTPNegativeTime := (*bot.config.NTPClient.AllowedNegativeDifference - (*bot.config.NTPClient.AllowedNegativeDifference * 2))
|
||||
if NTPcurrentTimeDifference > configNTPTime || NTPcurrentTimeDifference < configNTPNegativeTime {
|
||||
log.Warnf("Time out of sync (NTP): %v | (time.Now()): %v | (Difference): %v | (Allowed): +%v / %v", NTPTime, currentTime, NTPcurrentTimeDifference, configNTPTime, configNTPNegativeTime)
|
||||
if bot.config.NTPClient.Level == 0 {
|
||||
if *bot.config.Logging.Enabled && bot.config.NTPClient.Level == 0 {
|
||||
disable, errNTP := bot.config.DisableNTPCheck(os.Stdin)
|
||||
if errNTP != nil {
|
||||
log.Errorf("failed to disable ntp time check reason: %v", errNTP)
|
||||
|
||||
Reference in New Issue
Block a user