Skip to content

Commit 0ca24fa

Browse files
FIX caching
1 parent f6893e7 commit 0ca24fa

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/snowflake/connector/aio/_session_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from ..errorcode import ER_OCSP_RESPONSE_CERT_STATUS_REVOKED
1414
from ..ssl_wrap_socket import (
1515
FEATURE_OCSP_RESPONSE_CACHE_FILE_NAME,
16-
FEATURE_ROOT_CERTS_DICT_LOCK_TIMEOUT,
16+
get_feature_root_certs_dict_lock_timeout,
1717
)
1818
from ._ocsp_asn1crypto import SnowflakeOCSPAsn1Crypto
1919

@@ -105,7 +105,7 @@ async def validate_ocsp(
105105
ocsp_response_cache_uri=FEATURE_OCSP_RESPONSE_CACHE_FILE_NAME,
106106
use_fail_open=self._snowflake_ocsp_mode == OCSPMode.FAIL_OPEN,
107107
hostname=hostname,
108-
root_certs_dict_lock_timeout=FEATURE_ROOT_CERTS_DICT_LOCK_TIMEOUT,
108+
root_certs_dict_lock_timeout=get_feature_root_certs_dict_lock_timeout(),
109109
).validate(hostname, protocol, session_manager=session_manager)
110110
if not v:
111111
raise OperationalError(

src/snowflake/connector/ssl_wrap_socket.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,7 @@ def _openssl_connect(
228228
time.sleep(sleeping_time)
229229
if err:
230230
raise err
231+
232+
233+
def get_feature_root_certs_dict_lock_timeout():
234+
return FEATURE_ROOT_CERTS_DICT_LOCK_TIMEOUT

0 commit comments

Comments
 (0)