LG G3 and Nexus 6 switching off when internet connection lost

A

AC Question

A few months ago my Nexus 6 would randomly switch off and have to be powered back on. I've finally discovered that this happens if I'm using any app that tries to connect to the internet when the internet connection is being lost (when I go on the underground metro or if I'm in the heart of the countryside). I've since discovered this is also happening on the wife's LG G3.

Has anyone else experienced this? Is there a known fix?

It's not the end of the world. In order to stop it happening, I'm currently just switching on Airplane mode until I resurface....