From c33aecf8aa5fd1d73fb60810856f10774d720d75 Mon Sep 17 00:00:00 2001 From: tierno Date: Tue, 11 Aug 2020 08:58:31 +0000 Subject: [PATCH] fix 1182: change general timeout to connect timeout enlarge timeout from 10 to 15. Sometimes NBI takes many time to respond, low general timeout is not a good aproach, but connection timeout Change-Id: I17c67c94cccba83baf6ea56a9225e0674a223c11 Signed-off-by: tierno --- osmclient/sol005/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osmclient/sol005/http.py b/osmclient/sol005/http.py index b737894..0228d6a 100644 --- a/osmclient/sol005/http.py +++ b/osmclient/sol005/http.py @@ -24,7 +24,7 @@ from osmclient.common.exceptions import OsmHttpException, NotFound class Http(http.Http): - TIMEOUT = 10 + CONNECT_TIMEOUT = 15 def __init__(self, url, user='admin', password='admin', **kwargs): self._url = url @@ -64,7 +64,7 @@ class Http(http.Http): curl_cmd.setopt(pycurl.VERBOSE, True) if not skip_query_admin: endpoint = self._complete_endpoint(endpoint) - curl_cmd.setopt(pycurl.TIMEOUT, self.TIMEOUT) + curl_cmd.setopt(pycurl.CONNECTTIMEOUT, self.CONNECT_TIMEOUT) curl_cmd.setopt(pycurl.URL, self._url + endpoint) curl_cmd.setopt(pycurl.SSL_VERIFYPEER, 0) curl_cmd.setopt(pycurl.SSL_VERIFYHOST, 0) -- 2.25.1