diff --git a/hikyuu_cpp/hikyuu/global/agent/SpotAgent.cpp b/hikyuu_cpp/hikyuu/global/agent/SpotAgent.cpp index e20a6429..a1afe36f 100644 --- a/hikyuu_cpp/hikyuu/global/agent/SpotAgent.cpp +++ b/hikyuu_cpp/hikyuu/global/agent/SpotAgent.cpp @@ -37,10 +37,7 @@ void SpotAgent::start() { stop(); if (m_stop) { m_stop = false; - if (m_tg) { - m_tg.reset(); - m_tg = std::make_unique(m_work_num); - } + m_tg = std::make_unique(m_work_num); m_receiveThread = std::thread([this]() { work_thread(); }); } }