diff --git a/src/bentoml/_internal/runner/runner_handle/remote.py b/src/bentoml/_internal/runner/runner_handle/remote.py index aecf0dfef18..8ef5506f301 100644 --- a/src/bentoml/_internal/runner/runner_handle/remote.py +++ b/src/bentoml/_internal/runner/runner_handle/remote.py @@ -171,7 +171,7 @@ 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": + if os.getenv("BENTOML_RETRY_RUNNER_REQUESTS", "").lower() == "true": try: # most likely the TCP connection has been closed; retry after reconnecting await self._reset_client()