State of running code when Device goes offline

But if I have Cloud connection I should have Internet too. Right? I am lazy, since Particle.Connected exists I’m using that to check Internet connectivity.