Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 5e84fb5

Browse files
fix: correct stop inferencing condition (#1796)
Co-authored-by: vansangpfiev <[email protected]>
1 parent a64af00 commit 5e84fb5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

engine/controllers/server.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ void server::ProcessStreamRes(std::function<void(const HttpResponsePtr&)> cb,
140140
std::size_t buf_size) -> std::size_t {
141141
if (buf == nullptr) {
142142
LOG_TRACE << "Buf is null";
143-
inference_svc_->StopInferencing(engine_type, model_id);
143+
if (!(*err_or_done)) {
144+
inference_svc_->StopInferencing(engine_type, model_id);
145+
}
144146
return 0;
145147
}
146148

0 commit comments

Comments
 (0)