"vscode:/vscode.git/clone" did not exist on "5c1e62ff67fb40e8e1bf70714d8d4b3c7d151f41"
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:
async for request_output in stream:
yield request_output
except Exception as e:
# If there is an exception, abort the request.
except (Exception, asyncio.CancelledError) as e:
# If there is an exception or coroutine is cancelled, abort the
# request.
self._abort(request_id)
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