Skip to content

Commit 8e1fdef

Browse files
authored
chore: update httpclient (#834)
* chore: update httpclient
1 parent 513743f commit 8e1fdef

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tests/unit/http/test_http_client.py

+1
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ def test_session_not_preserved(self):
293293
self.assertEqual(response_2.content, "response_2")
294294

295295

296+
296297
class MyVersion(Version):
297298
def __init__(self, domain):
298299
super().__init__(domain, "v1")

twilio/http/http_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(
4040
self.session = Session() if pool_connections else None
4141
if self.session and max_retries is not None:
4242
self.session.mount("https://", HTTPAdapter(max_retries=max_retries))
43-
if self.session is not None:
43+
elif self.session is not None:
4444
self.session.mount(
4545
"https://", HTTPAdapter(pool_maxsize=min(32, os.cpu_count() + 4))
4646
)

0 commit comments

Comments
 (0)