abort orphaned stream tasks on drop, reduce timeout to 60s
Spawned streaming tasks were never cancelled when a turn ended or retried, leaving zombie tasks blocked on dead vLLM connections. AbortOnDrop wrapper aborts the task when it goes out of scope. Chunk timeout reduced from 120s to 60s. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
0148dbaa06
commit
13d9cc962e
2 changed files with 15 additions and 6 deletions
|
|
@ -246,7 +246,7 @@ impl Agent {
|
|||
// Stream events from the API — we route each event to the
|
||||
// appropriate UI pane rather than letting the API layer do it.
|
||||
let api_messages = self.assemble_api_messages();
|
||||
let mut rx = self.client.start_stream(
|
||||
let (mut rx, _stream_guard) = self.client.start_stream(
|
||||
&api_messages,
|
||||
Some(&self.tool_defs),
|
||||
ui_tx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue