summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyagl/services/base.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/pyagl/services/base.py b/pyagl/services/base.py
index 766a51b..e34d89c 100644
--- a/pyagl/services/base.py
+++ b/pyagl/services/base.py
@@ -238,9 +238,15 @@ class AGLBaseService:
self.logger.error("Unhandled seal: " + str(e))
async def afbresponse(self):
- resp = await self.response()
- if resp is not None:
- return AFBResponse(resp)
+ resp = None
+ try:
+ resp = await self.response()
+ resp = AFBResponse(resp)
+ except TypeError as v: # on asyncio.timeout()-ed response will return None and AFBResponse() will
+ # raise an error, catch it. probably more appropriate to handle it in AFBResponse()
+ self.logger.warning("Something probably timedout on response(), just tried to parse None to AFBResponse()")
+
+ return resp
async def request(self, verb: str, values: Union[str, dict] = "", msgid: int = None, api=None):
msgid = next(newrand()) if msgid is None else msgid