Hello
Currently controlling the connection as such:
function M.checksInternetConnection() local socket = require("socket") local test = socket.tcp() test:settimeout(1, 't') -- Set timeout to 1 second local testResult = test:connect("www.google.com", 80) local thereIs if not(testResult == nil) then print("Internet access is available") thereIs = true else print("Internet access is not available") thereIs = false end test:close() test = nil return thereIs end
But on the forum I’ve seen a lot of complaints and I actually think it sometimes blocks the app for several seconds.
So what is the best way to make sure that we have access to internet?