Skip to content

Commit

Permalink
fix: Close http connection after request to avoid ResourceWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
DerDreschner committed Jan 15, 2025
1 parent 99e6a2e commit 433c3bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions icalevents/icaldownload.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def data_from_url(self, url, apple_fix=False):
url = apple_url_fix(url)

_, content = self.http.request(url)
self.http.close()

if not content:
raise ConnectionError("Could not get data from %s!" % url)
Expand Down

0 comments on commit 433c3bb

Please sign in to comment.