Skip to content

Commit 03efb92

Browse files
author
ochafik
committed
server: support cancellation of prompt processing
1 parent 42f5465 commit 03efb92

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/server/server.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,6 +1877,13 @@ struct server_context {
18771877
system_prompt_update();
18781878
}
18791879

1880+
for (auto & slot : slots) {
1881+
if (slot.is_processing() && slot.is_alive && !slot.is_alive()) {
1882+
SLT_WRN(slot, "%s", "slot connection died\n");
1883+
slot.release();
1884+
}
1885+
}
1886+
18801887
// check if all slots are idle
18811888
{
18821889
bool all_idle = true;

0 commit comments

Comments
 (0)