@@ -305,7 +305,7 @@ def execute(self, command, params):
305
305
LOGGER .debug ("%s %s %s" , command_info [0 ], url , str (trimmed ))
306
306
return self ._request (command_info [0 ], url , body = data )
307
307
308
- def _request (self , method , url , body = None ):
308
+ def _request (self , method , url , body = None , timeout = 120 ):
309
309
"""Send an HTTP request to the remote server.
310
310
311
311
:Args:
@@ -323,12 +323,12 @@ def _request(self, method, url, body=None):
323
323
body = None
324
324
325
325
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 )
327
327
statuscode = response .status
328
328
else :
329
329
conn = self ._get_connection_manager ()
330
330
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 )
332
332
statuscode = response .status
333
333
data = response .data .decode ("UTF-8" )
334
334
LOGGER .debug ("Remote response: status=%s | data=%s | headers=%s" , response .status , data , response .headers )
0 commit comments