"git@developer.sourcefind.cn:OpenDAS/apex.git" did not exist on "7e311e4bcd9ba7d446d9c88f52143b0cd05ff228"
Unverified Commit b9fe4616 authored by Jerry Yang's avatar Jerry Yang Committed by GitHub
Browse files

Abort when coroutine is cancelled (#1020)

parent 64ca424e
...@@ -395,8 +395,9 @@ class AsyncLLMEngine: ...@@ -395,8 +395,9 @@ class AsyncLLMEngine:
async for request_output in stream: async for request_output in stream:
yield request_output yield request_output
except Exception as e: except (Exception, asyncio.CancelledError) as e:
# If there is an exception, abort the request. # If there is an exception or coroutine is cancelled, abort the
# request.
self._abort(request_id) self._abort(request_id)
raise e raise e
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment