mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Make the watchdog much more aggressive
For individually hosted plugins this will behave the same. For plugin
groups it would have been nice if we could shut down individual plugins,
but dangling threads are apparently a real issue. This should be
equivalent in all use cases.
This also reverts commit bda9a0b75f.
This commit is contained in:
@@ -52,6 +52,16 @@ void HostBridge::shutdown_if_dangling() {
|
||||
<< std::endl;
|
||||
std::cerr << " This bridge will shut down now." << std::endl;
|
||||
|
||||
close_sockets();
|
||||
// FIXME: Closing the sockets should work fine, but it still leaves some
|
||||
// background threads hanging around. For now we'll just
|
||||
// terminate the entire process instead since we'll probably be
|
||||
// left in a bad state anyways. The only thing this could
|
||||
// potentially break would be sharing a plugin group across two
|
||||
// different DAWs, but you really shouldn't be doing that. :D
|
||||
//
|
||||
// Check this commit for another now-unnecessary change we
|
||||
// reverted here.
|
||||
// close_sockets();
|
||||
TerminateProcess(GetCurrentProcess(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -657,13 +657,6 @@ intptr_t VST_CALL_CONV host_callback_proxy(AEffect* effect,
|
||||
intptr_t value,
|
||||
void* data,
|
||||
float option) {
|
||||
try {
|
||||
return get_bridge_instance(effect).host_callback(effect, opcode, index,
|
||||
value, data, option);
|
||||
} catch (const boost::system::system_error& error) {
|
||||
std::cerr << "Error while handling callback:" << std::endl;
|
||||
std::cerr << error.what() << std::endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
return get_bridge_instance(effect).host_callback(effect, opcode, index,
|
||||
value, data, option);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user