diff --git a/keycloak/connection.py b/keycloak/connection.py index 7d5ed2f..3bc55f7 100644 --- a/keycloak/connection.py +++ b/keycloak/connection.py @@ -49,16 +49,16 @@ class ConnectionManager(object): self._s = requests.Session() self._s.auth = lambda x: x # don't let requests add auth headers - # retry once to reset connection with Keycloak after tomcat's ConnectionTimeout - # see https://github.com/marcospereirampj/python-keycloak/issues/36 - for protocol in ('https://', 'http://'): - adapter = HTTPAdapter(max_retries=1) - # adds POST to retry whitelist - allowed_methods = set(adapter.max_retries.allowed_methods) - allowed_methods.add('POST') - adapter.max_retries.allowed_methods = frozenset(allowed_methods) - - self._s.mount(protocol, adapter) + # # retry once to reset connection with Keycloak after tomcat's ConnectionTimeout + # # see https://github.com/marcospereirampj/python-keycloak/issues/36 + # for protocol in ('https://', 'http://'): + # adapter = HTTPAdapter(max_retries=1) + # # adds POST to retry whitelist + # allowed_methods = set(adapter.max_retries.allowed_methods) + # allowed_methods.add('POST') + # adapter.max_retries.allowed_methods = frozenset(allowed_methods) + + # self._s.mount(protocol, adapter) def __del__(self): self._s.close()