ping-testing / isReachable implementation (buggy)