Catch server disconnected errors from computes

Fix #953
pull/954/head
Julien Duponchelle 7 years ago
parent a62b791c68
commit 95f864c871
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -504,7 +504,7 @@ class Compute:
response = yield from self._session().request(method, url, headers=headers, data=data, auth=self._auth, chunked=chunked, timeout=timeout)
except asyncio.TimeoutError as e:
raise ComputeError("Timeout error when connecting to {}".format(url))
except (aiohttp.errors.ClientOSError, aiohttp.errors.ClientRequestError, aiohttp.ClientResponseError) as e:
except (aiohttp.errors.ClientOSError, aiohttp.errors.ClientRequestError, aiohttp.errors.ServerDisconnectedError, aiohttp.ClientResponseError) as e:
raise ComputeError(str(e))
body = yield from response.read()
if body and not raw:

Loading…
Cancel
Save