diff --git a/engine/controllers/server.cc b/engine/controllers/server.cc index a9920e8aa..4c6bcaf82 100644 --- a/engine/controllers/server.cc +++ b/engine/controllers/server.cc @@ -140,7 +140,9 @@ void server::ProcessStreamRes(std::function cb, std::size_t buf_size) -> std::size_t { if (buf == nullptr) { LOG_TRACE << "Buf is null"; - inference_svc_->StopInferencing(engine_type, model_id); + if (!(*err_or_done)) { + inference_svc_->StopInferencing(engine_type, model_id); + } return 0; }