Bad internet connection verification test

Ahhh yep - I was a tad over zealous in my post. Thanks for pointing it out  

Strange I got no warnings of the methods, not modes from corona/lua - and it did appear top be better when I ran it.

Changed it to:

connection:settimeout(1,b)

connection:settimeout(1,t)

And I can most assuredly report - that my hang problems are now gone.

Good to hear that you’ve solved the issue!

(I assume that your example above has a typo as “b” and “t” have no quotes, otherwise they would translate to nil which would make the timeout block indefinitely)

correct no quotes

with the added bonus of the form software turning it into a smiley

I just want to add that using a hostname address can cause the long hangs. If the user’s wifi is connected but something goes wrong on the wifi end you still get long hangs due to DNS resolving overriding the block timeout settings. To get past this you need to use a actual IP address and your timeout issues disappear, as its not ICMP protocol you can’t just ping any old server such as 4.4.4.4 as there TCP ports are blocked on the standard 80 (maybe there is one somewhere).

So what I do is ping my own servers and have several fallback pings found out on the web from various services. If the fallbacks fail I then throw away that fallabck and use several more from a pool of addresses next time I check if these fail then its likely no connection.

Fallbacks are good for backups. No one wants to have to submit and wait week just to get the ip working again.  Alternatively you can pull your configs of pings from a server. Another option is to make small request to script that returns OK from your server.

I just want to add that using a hostname address can cause the long hangs. If the user’s wifi is connected but something goes wrong on the wifi end you still get long hangs due to DNS resolving overriding the block timeout settings. To get past this you need to use a actual IP address and your timeout issues disappear, as its not ICMP protocol you can’t just ping any old server such as 4.4.4.4 as there TCP ports are blocked on the standard 80 (maybe there is one somewhere).

So what I do is ping my own servers and have several fallback pings found out on the web from various services. If the fallbacks fail I then throw away that fallabck and use several more from a pool of addresses next time I check if these fail then its likely no connection.

Fallbacks are good for backups. No one wants to have to submit and wait week just to get the ip working again.  Alternatively you can pull your configs of pings from a server. Another option is to make small request to script that returns OK from your server.