Revert "avoid closing the log while the leader is still running."

This reverts commit d1bdbbedc83885c44095bb0080e45a07dc7ee9bb.