diff --git a/penquins/penquins.py b/penquins/penquins.py index bf75855..d1c52d5 100644 --- a/penquins/penquins.py +++ b/penquins/penquins.py @@ -174,7 +174,7 @@ def add(self, name, cfg, **kwargs): "head": self.instances[name]["session"].head, } # mount session adapters - timeout = kwargs.get("timeout", DEFAULT_TIMEOUT) + timeout = cfg.get("timeout", kwargs.get("timeout", DEFAULT_TIMEOUT)) pool_connections = kwargs.get("pool_connections", DEFAULT_POOLSIZE) pool_maxsize = kwargs.get("pool_maxsize", DEFAULT_POOLSIZE) max_retries = kwargs.get("max_retries", DEFAULT_RETRIES)