Skip to content

Commit

Permalink
fix: retry env to be None type
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm committed Oct 31, 2022
1 parent 92461d7 commit fe205c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bentoml/_internal/runner/runner_handle/remote.py
Expand Up @@ -171,7 +171,8 @@ async def async_run_method(
) as resp:
body = await resp.read()
except aiohttp.ClientOSError as e:
if os.getenv("BENTOML_RETRY_RUNNER_REQUESTS").lower() == "true":
retry_env = os.environ.get("BENTOML_RETRY_RUNNER_REQUESTS")
if retry_env is not None and retry_env.lower() == "true":
try:
# most likely the TCP connection has been closed; retry after reconnecting
await self._reset_client()
Expand Down

0 comments on commit fe205c5

Please sign in to comment.