fixed a bug with the method checking for internet connection on Strict
Mode where the HttpUrlConnection was not explicitly closed.