Skip to content

Commit 70ed838

Browse files
committed
fix
1 parent 87f5626 commit 70ed838

File tree

1 file changed

+4
-2
lines changed
  • lightllm/server/core/objs

1 file changed

+4
-2
lines changed

lightllm/server/core/objs/req.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,12 @@ def can_release(self):
208208
ref_count_ok = self.ref_count == 1
209209
can_released_mark = self.can_released_mark
210210

211-
if (self.is_aborted or self.stop_str_matched) and can_released_mark and ref_count_ok:
211+
if self.is_aborted and can_released_mark and ref_count_ok:
212212
return True
213213

214-
if self.finish_status.is_finished() and can_released_mark and ref_count_ok and self.out_tokens_queue.is_empty():
214+
ok_finished_gen_req = self.finish_status.is_finished() or self.stop_str_matched
215+
216+
if ok_finished_gen_req and can_released_mark and ref_count_ok and self.out_tokens_queue.is_empty():
215217
return True
216218

217219
return False

0 commit comments

Comments
 (0)