InvokeRepeating running twice in rapid succession?

def BeginFiring():
if not _firing:
_firing = true
Debug.Log("Begin " + Time.time + " Delay " + Delay + " Rate of Fire " + _turret.RateOfFire)
InvokeRepeating(“Fire”, Delay, _turret.RateOfFire)

def CeaseFiring():
	if _firing:
		_firing = false
		CancelInvoke()
	
def Fire():
	Debug.Log("Fire " + Delay + " Count2 " + _count2 + " Time " + Time.time)
	_count2 += 1
	for i in range(_turret.NumberOfProjectiles):
		projectile = Instantiate(_turret.Projectile, BarrelObject.position, BarrelObject.localRotation);
		velocity = BarrelObject.TransformDirection(Vector3(Random.Range(-_turret.Deviation, _turret.Deviation), Random.Range(-_turret.Deviation, _turret.Deviation), _turret.ProjectileForce));
		projectile.rigidbody.velocity = velocity;

These are my outputs. I have two “Barrel” scripts running with different delays, so I logged that so I know which is running. First I get both starting up in my BeginFiring() method and that looks correct.

Begin 1.28 Delay 0 Rate of Fire 1

Begin 1.28 Delay 0.5 Rate of Fire 1

Then I log in my Fire() method and see my 0 delay script is running twice in rapid succession. After this initial double-run it functions normally.

Fire 0 Count2 0 Time 1.28

Fire 0 Count2 1 Time 1.282936

What’s the deal?

InvokeRepeating has issues with using 0, so instead of that, use something like .001.