request for google only if own server is not reachable

do request of google to check internet connection only after server is not reachable