From 87de5775bf4ead38a0300b091a0caf4e4d2ed1c3 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 3 Jan 2015 20:35:26 +0000 Subject: [PATCH] Keep plugin-bridges messages alive when waiting for save --- source/backend/plugin/CarlaPluginBridge.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/backend/plugin/CarlaPluginBridge.cpp b/source/backend/plugin/CarlaPluginBridge.cpp index b8a0c6868..3356c90bd 100644 --- a/source/backend/plugin/CarlaPluginBridge.cpp +++ b/source/backend/plugin/CarlaPluginBridge.cpp @@ -923,13 +923,14 @@ public: carla_stdout("CarlaPluginBridge::prepareForSave() - sent, now waiting..."); - for (int i=0; i < 200; ++i) + for (int i=0; i < 300; ++i) { - if (fSaved) + if (fSaved || ! fBridgeThread.isThreadRunning()) break; - carla_msleep(30); + carla_msleep(20); pData->engine->callback(ENGINE_CALLBACK_IDLE, 0, 0, 0, 0.0f, nullptr); pData->engine->idle(); + idle(); } if (! fSaved)