Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/master/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#define FATAL_FILENAME "master-fatal.lastlog"
#define MASTER_PID_FILE_NAME "master.pid"
#define SERVICE_TIME_MOVED_BACKWARDS_MAX_THROTTLE_MSECS (60*3*1000)
#define SERVICE_TIME_MOVED_FORWARDS_MIN_WARNING_MSECS (200*1000)

struct master_delayed_error {
enum log_type type;
Expand Down Expand Up @@ -659,8 +660,13 @@ master_time_moved(const struct timeval *old_time,

if (diff < 0) {
diff = -diff;
i_warning("Time moved forward by %lld.%06lld seconds - adjusting timeouts.",
diff / 1000000, diff % 1000000);
if (diff < SERVICE_TIME_MOVED_FORWARDS_MIN_WARNING_MSECS) {
i_info("Time moved forward by %lld.%06lld seconds - adjusting timeouts.",
diff / 1000000, diff % 1000000);
} else {
i_warning("Time moved forward by %lld.%06lld seconds - adjusting timeouts.",
diff / 1000000, diff % 1000000);
}
return;
}
msecs = (unsigned int)(diff/1000);
Expand Down