Skip to content

Commit

Permalink
Close connection in checks.isResolvable() when done with it
Browse files Browse the repository at this point in the history
  • Loading branch information
gothub committed Apr 21, 2020
1 parent 581cc3e commit b8787b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions metadig/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def isResolvable(url):
except:
return (False, "Unexpected error:", sys.exc_info()[0])

response.close()
if(response.code in set([200, 202, 203, 206, 301, 302, 303])):
return (True, "Successfully resolved the URL {}: status {}".format(url, response.code))
else:
Expand Down

0 comments on commit b8787b3

Please sign in to comment.