File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,8 @@ def _parse_rate_limits(header, now=None):
196196class BaseHttpTransport (Transport ):
197197 """The base HTTP transport."""
198198
199+ TIMEOUT = 10 # seconds
200+
199201 def __init__ (self , options ):
200202 # type: (Self, Dict[str, Any]) -> None
201203 from sentry_sdk .consts import VERSION
@@ -621,7 +623,7 @@ def _get_pool_options(self):
621623 options = {
622624 "num_pools" : 2 if num_pools is None else int (num_pools ),
623625 "cert_reqs" : "CERT_REQUIRED" ,
624- "timeout" : urllib3 .Timeout (connect = 5 , read = 5 ),
626+ "timeout" : urllib3 .Timeout (connect = self . TIMEOUT , read = self . TIMEOUT ),
625627 }
626628
627629 socket_options = None # type: Optional[List[Tuple[int, int, int | bytes]]]
@@ -766,6 +768,14 @@ def _request(
766768 self ._auth .get_api_url (endpoint_type ),
767769 content = body ,
768770 headers = headers , # type: ignore
771+ extensions = {
772+ "timeout" : {
773+ "connect" : self .TIMEOUT ,
774+ "read" : self .TIMEOUT ,
775+ "write" : self .TIMEOUT ,
776+ "pool" : self .TIMEOUT ,
777+ }
778+ },
769779 )
770780 return response
771781
You can’t perform that action at this time.
0 commit comments