Skip to content
Snippets Groups Projects
Commit ef64760f authored by inso's avatar inso
Browse files

Longer timeout

parent 9cbe9c81
Branches
Tags v1.3.1
No related merge requests found
...@@ -111,9 +111,10 @@ class API(object): ...@@ -111,9 +111,10 @@ class API(object):
Arguments: Arguments:
- `path`: the request path - `path`: the request path
""" """
logging.debug("Request : {0}".format(self.reverse_url(path))) logging.debug("Request : {0}".format(self.reverse_url(path)))
response = yield from asyncio.wait_for(aiohttp.get(self.reverse_url(path), params=kwargs, response = yield from asyncio.wait_for(aiohttp.get(self.reverse_url(path), params=kwargs,
headers=self.headers, connector=API.aiohttp_connector), timeout=15) headers=self.headers, connector=API.aiohttp_connector), timeout=30)
if response.status != 200: if response.status != 200:
raise ValueError('status code != 200 => %d (%s)' % (response.status, (yield from response.text()))) raise ValueError('status code != 200 => %d (%s)' % (response.status, (yield from response.text())))
...@@ -134,7 +135,7 @@ class API(object): ...@@ -134,7 +135,7 @@ class API(object):
response = yield from asyncio.wait_for( response = yield from asyncio.wait_for(
aiohttp.post(self.reverse_url(path), data=kwargs, headers=self.headers, aiohttp.post(self.reverse_url(path), data=kwargs, headers=self.headers,
connector=API.aiohttp_connector), connector=API.aiohttp_connector),
timeout=15) timeout=30)
return response return response
from . import network, blockchain, tx, wot, node, ud from . import network, blockchain, tx, wot, node, ud
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment