From 2d65d1351f390a560682a103a6c7959e74dd4727 Mon Sep 17 00:00:00 2001 From: nileshpatil6 Date: Wed, 3 Jun 2026 22:38:59 +0530 Subject: [PATCH] fix(http): fall back to self.timeout in AsyncTwilioHttpClient.request When the timeout argument is None, AsyncTwilioHttpClient.request did not fall back to self.timeout, unlike the sync TwilioHttpClient. This meant the timeout configured on the client had no effect in async usage. Match the sync behavior: if timeout is None, use self.timeout. Fixes #925 Signed-off-by: nileshpatil6 --- twilio/http/async_http_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/twilio/http/async_http_client.py b/twilio/http/async_http_client.py index ecd5d4de95..50b90d417e 100644 --- a/twilio/http/async_http_client.py +++ b/twilio/http/async_http_client.py @@ -76,7 +76,9 @@ async def request( :return: An http response """ - if timeout is not None and timeout <= 0: + if timeout is None: + timeout = self.timeout + elif timeout <= 0: raise ValueError(timeout) basic_auth = None