diff --git a/rocclr/device/devhostcall.cpp b/rocclr/device/devhostcall.cpp index d59e4f799b..4a5bfb235b 100644 --- a/rocclr/device/devhostcall.cpp +++ b/rocclr/device/devhostcall.cpp @@ -334,7 +334,7 @@ void HostcallListener::consumePackets() { } void HostcallListener::terminate() { - if (!amd::Os::isThreadAlive(thread_)) { + if (thread_.state() < Thread::FINISHED && !amd::Os::isThreadAlive(thread_)) { return; } kHostThreadActive.state = Init::State::kExit;