Hopefully the folks from Photon Cloud will respond, but generally speaking if the game freezes due to networking and you don’t want that to happen you need to wrap your network calls in a test to make sure the network is alive. People can put their devices in airplane mode, turn off WiFi or Cellular Data, Drive through a tunnel or a host of other reasons. Your game needs to test to see if it has internet and respond accordingly (i.e. not make network requests including calls to services like Photon Cloud).
On OS-X and iOS we support the networkStatus events. See: https://docs.coronalabs.com/api/event/networkStatus/index.html
But for other things you have to do it the old fashioned day and ping a network server and see if you can reach it. Such as:
local socket = require("socket") local http = require("socket.http") local ltn12 = require("ltn12") function testNetworkConnection() print("testing connection") if http.request( "http://google.com" ) == nil then print("cant connect to google") return false end print("got a connection") return true end
This call is pretty fast if the network is up. I think it’s default timeout is one second, so if the network is down, you might have a momentary freeze.
I would check at startup, after a resume event and before I make a network call and popup a message telling them they need Internet to use the feature.
Rob