Add Timeout to "Ping" action
Ping action can get a delay to a website, so we can use that to test if the network (like a wifi you connected) is connected to the Internet, but when the network is not connected to the Internet, the Ping action won't stop for quit a few seconds.
So here is the suggestion, add timeout to this action, if the ping time has last for more than the timeout we have set (say 500ms), then continue the task.