Skip to content

Commit

Permalink
Fix ineffective mount operation
Browse files Browse the repository at this point in the history
HTTPAdatper mounted onto requests.Session using the 'http' prefix which is always superseded by already existing 'https://'.

Effectively, the current code will not retry the mixpanel POST request and will cause a connection reset error.
  • Loading branch information
dror-fs authored Nov 10, 2023
1 parent 3dcd2d2 commit 7297eb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mixpanel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ def __init__(self, events_url=None, people_url=None, import_url=None,
)

self._session = requests.Session()
self._session.mount('http', adapter)
self._session.mount('https://', adapter)

def send(self, endpoint, json_message, api_key=None, api_secret=None):
"""Immediately record an event or a profile update.
Expand Down

0 comments on commit 7297eb4

Please sign in to comment.