Hi.
My issue is the following: I use the following code to verify the connection with the internet whether to show or not the ads, but dependind on the speed of connection of the users, it yields to a weird delay while verifying and it seems the app is broken, so it comes back again and the app works fine.
Is there a more effective way and less slow to verify internet connection than this one?
Thanks. :)Â
module(..., package.seeall) local socket = require("socket"); function test() local connection = socket.tcp(); connection:settimeout(1); local result = connection:connect("www.google.com", 80); connection:close(); if(result)then return true; end return false; end