Restarting the application after WiFi failure through System.reset?

I have an application running on Photon but sometimes the WiFi is bad and is interrupted for a short while. In the application I detect if the device is connected, and if not I generate a system.reset() and I expected the device to reconnect and smoothly run the application again, similar to when I would push the reset button on the device. This obviously is not the case.

Is there a fundamental difference between pushing the reset button or applying a system.reset in the application software.

And if so: is there a way to avoid this?

Is this a Photon 1 or Photon 2? Which Device OS version?

The device should reconnect automatically without restart. However it is possible that a restart will be required in some cases. Almost always System.reset is sufficient. Sometimes going into hibernate sleep for 30 seconds is better than just resetting on the Photon 1.

Is the device actually resetting and just not reconnecting? Or is it not resetting?

It does not reconnect

Device is Photon 1, Device OS version: 2.3.0.

The device is definitely not reconnecting; if it is actually resetting I cannot see because there is no connection.

The only way to reconnect is through a “hard reset”: pushing the RST button

I would try the sleep technique after failure to connect for a few minutes. I have a lot of Photon 1 devices monitoring my house and since I switched to doing that I rarely have to physically reset devices.

and what exactly doe you mean by “the sleep technique”?

Instead of doing System.reset() do System.sleep(SLEEP_MODE_DEEP, 30).

I don't know why this seems to help, but it essentially powers everything down instead of using the reset vector, so it's plausible that it could work slightly differently.