diff options
-rw-r--r-- | proto-wine/ftnoir_protocol_wine.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/proto-wine/ftnoir_protocol_wine.cpp b/proto-wine/ftnoir_protocol_wine.cpp index edeb8ce4..1b259fd4 100644 --- a/proto-wine/ftnoir_protocol_wine.cpp +++ b/proto-wine/ftnoir_protocol_wine.cpp @@ -18,11 +18,16 @@ wine::wine() = default; wine::~wine() { #ifndef OTR_WINE_NO_WRAPPER + bool exit = false; if (shm) { shm->stop = true; - wrapper.waitForFinished(100); + exit = wrapper.waitForFinished(100); + } + if (!exit) + { + wrapper.kill(); + wrapper.waitForFinished(-1); } - wrapper.kill(); #endif //shm_unlink("/" WINE_SHM_NAME); } |