Skip to content

Commit f81018b

Browse files
committed
Use throttled_http_client
1 parent e9a601a commit f81018b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

msal/application.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from .token_cache import TokenCache
2121
import msal.telemetry
2222
from .region import _detect_region
23-
from .http_decorate import _decorate
23+
from .throttled_http_client import ThrottledHttpClient
2424

2525

2626
# The __init__.py will import this. Not the other way around.
@@ -296,7 +296,10 @@ def __init__(
296296
a = requests.adapters.HTTPAdapter(max_retries=1)
297297
self.http_client.mount("http://", a)
298298
self.http_client.mount("https://", a)
299-
_decorate(self.http_client, {}) # Hard code an in-memory cache, for now
299+
self.http_client = ThrottledHttpClient(
300+
self.http_client,
301+
{} # Hard code an in-memory cache, for now
302+
)
300303

301304
self.app_name = app_name
302305
self.app_version = app_version

0 commit comments

Comments
 (0)