Process ping only when connected
Clean up race condition