mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 02:25:01 +08:00
Abort when coroutine is cancelled (#1020)
This commit is contained in:
parent
64ca424e75
commit
b9fe4616f9
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user