Cloud API, Ping issues

For my purposes I use ping to test if my device is online. When testing connectivity issues, I forced disconnection of my xenon, by pulling the Ethernet cable. I noticed that the first call of the Ping Cloud API call would return False, but subsequent calls would return True, while device is still offline. Any insights on this issue ?

Update: To re-create try ping with a connected device (should return online:true), disconnect it and call ping again (obvious delay, returns online:false). Back-to-back call to the ping again (obvious delay, returns online:true).

Update: Turning off/on the WiFi module on Photon, works as expected.