Skip to content

Commit f075058

Browse files
committed
[Offload] Fix server thread from being shut down if unused
1 parent 3a4376b commit f075058

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

offload/plugins-nextgen/common/src/PluginInterface.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,11 +1633,12 @@ Error GenericPluginTy::deinit() {
16331633
if (GlobalHandler)
16341634
delete GlobalHandler;
16351635

1636-
if (RPCServer) {
1636+
if (RPCServer->Thread->Running.load(std::memory_order_relaxed))
16371637
if (Error Err = RPCServer->shutDown())
16381638
return Err;
1639+
1640+
if (RPCServer)
16391641
delete RPCServer;
1640-
}
16411642

16421643
if (RecordReplay)
16431644
delete RecordReplay;

0 commit comments

Comments
 (0)