Electron sample code functionality

The README doesn't cover this case.

If it takes too long to make a connection to the cloud the code will attempt a reset. The connection event log will indicate whether it was able to make a cellular connection or not.

It doesn't say anything about reseting the modem.

If there is cellular but not cloud, it will also do some additional tests. It currently will ping the Google DNS (8.8.8.8) and also the Particle API server (api.particle.io, which also tests DNS). These results are included in the connection event log.

This case only covers the no-cloud connection (but 3G connection).

It also has listening mode detection, and will reset the Electron if the Electron somehow ends up in listening mode, blinking dark blue, for more than 30 seconds.

The listening mode isn't a problem here.

The "Smart Reboot" section explain somehow this point, but it doesn't seem to match with the actual functionality:

Also, because it's more efficient to leave the modem up on a reset, this code tries to do that first, and if that fails, then resets the modem. It also does certain checks first, so if the modem is really acting strangely, it will immediately do a modem reset.

UPDATE:

I think there might be other errors (or outdated functionalities) in the code. Particle.keepAlive function is executed before Particle.connect. @rickkas7 himself says in it's own post that should be executed after it.

Is the example code still reliable?
Thank you