Check connectivity WiFly (Duplicate , delete please)

Hello.

I have Arduino and WiFly working good, but i try to look for possible hungs and i check a problem.

How i know when WiLFy it’s really connected to internet?

For example in my code in the setup Wifly begin + Join , then every minute WiFly send data to a server all it’s right , but if i disconnect the router the WiFly doesn’t know it , and send the data (it’s say) without send errors .

I check the ip and when it’s without connectivity it’s the same ip , didn`t turn to 0.0.0.0 ?¿?¿ (i think this it’s normal…)

The question it’s … how Arduino could check the really connectivity of WyFly ?? (some like ping…?¿?¿)

Thanks!!!