My game stucks over the Splash screen

My game stucks over the Splash screen when internet is not available but WiFi is on. This is what I wrote in the beginning of main.lua

if(internetConnected()) then
  globals.isReachable = 1;
end

function internetConnected()           
    local connection = socket.tcp()
    connection:settimeout(1000)
    local result = connection:connect(“www.google.com”, 80)
    connection:close()
    if (result) then return true end
    return false
en

What do you do with your globals.isReachable check?

Have you put in some print statements to see where you’re getting to?

Rob

Hi,

I’m able to resolve the issue. Actually, the issue was in my code on the function settimeout(1000). Where 1000 is the seconds. I changed it to 1 second :slight_smile:

Thanks a lot

What do you do with your globals.isReachable check?

Have you put in some print statements to see where you’re getting to?

Rob

Hi,

I’m able to resolve the issue. Actually, the issue was in my code on the function settimeout(1000). Where 1000 is the seconds. I changed it to 1 second :slight_smile:

Thanks a lot