client: ping: ensure connected status in a cleaner way

The decorator idiom was breaking the docs.