@@ -305,7 +305,7 @@ def execute(self, command, params):
305305 LOGGER .debug ("%s %s %s" , command_info [0 ], url , str (trimmed ))
306306 return self ._request (command_info [0 ], url , body = data )
307307
308- def _request (self , method , url , body = None ):
308+ def _request (self , method , url , body = None , timeout = 120 ):
309309 """Send an HTTP request to the remote server.
310310
311311 :Args:
@@ -323,12 +323,12 @@ def _request(self, method, url, body=None):
323323 body = None
324324
325325 if self .keep_alive :
326- response = self ._conn .request (method , url , body = body , headers = headers )
326+ response = self ._conn .request (method , url , body = body , headers = headers , timeout = timeout )
327327 statuscode = response .status
328328 else :
329329 conn = self ._get_connection_manager ()
330330 with conn as http :
331- response = http .request (method , url , body = body , headers = headers )
331+ response = http .request (method , url , body = body , headers = headers , timeout = timeout )
332332 statuscode = response .status
333333 data = response .data .decode ("UTF-8" )
334334 LOGGER .debug ("Remote response: status=%s | data=%s | headers=%s" , response .status , data , response .headers )
0 commit comments