diff options
author | antirez <antirez@gmail.com> | 2019-03-21 17:18:24 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-05-13 16:34:25 +0200 |
commit | 91238a603106f6d774398e786e6692256527cd6d (patch) | |
tree | d1e8c195e9a62119c6acd7a826b78c6bab914773 | |
parent | ee2da67cc67f2afc37e06a74225dd2f05fd57419 (diff) | |
download | redis-91238a603106f6d774398e786e6692256527cd6d.tar.gz |
Mostly aesthetic changes to restartAOF().
See #3829.
-rw-r--r-- | src/replication.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/replication.c b/src/replication.c index ea417c9dd..ee3e25593 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1092,12 +1092,16 @@ void replicationCreateMasterClient(int fd, int dbid) { void restartAOF() { unsigned int tries, max_tries = 10; for (tries = 0; tries < max_tries; ++tries) { - if (tries) sleep(1); if (startAppendOnly() == C_OK) break; - serverLog(LL_WARNING,"Failed enabling the AOF after successful master synchronization! Trying it again in one second."); + serverLog(LL_WARNING, + "Failed enabling the AOF after successful master synchronization! " + "Trying it again in one second."); + sleep(1); } if (tries == max_tries) { - serverLog(LL_WARNING,"FATAL: this replica instance finished the synchronization with its master, but the AOF can't be turned on. Exiting now."); + serverLog(LL_WARNING, + "FATAL: this replica instance finished the synchronization with " + "its master, but the AOF can't be turned on. Exiting now."); exit(1); } } |