mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Fix issue with closing sockets in plugin groups
As per Boost.Asio's manual, an explicit `socket.shutdown()` is needed before calling `close()`. For some reason this worked fine in almost every situation, but when hosting both a plugin hosted within a group host process and a normal individually hosted plugin within a single process, and then removing those two plugins in order, the `host_vst_dispatch` socket of the first plugin never got closed. This would hang the entire shutdown sequence to hang on the `dispatch_handler` jthread. First discovered in #45
This commit is contained in:
@@ -14,6 +14,9 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
errors and crash yabridge.
|
||||
- Fixed a regression where certain fake dropdown menus such as those used in the
|
||||
Tokyo Dawn Records plugins would close immediately when hovering over them.
|
||||
- Fixed an issue where plugins hosted within a plugin group would not shut down
|
||||
properly in certain situations. This would cause the VST host to hang while
|
||||
removing such a plugin.
|
||||
|
||||
### yabridgectl
|
||||
|
||||
|
||||
@@ -262,5 +262,7 @@ void GroupHost::terminate() {
|
||||
// There's no need to manually terminate group host processes as they will
|
||||
// shut down automatically after all plugins have exited. Manually closing
|
||||
// the dispatch socket will cause the associated plugin to exit.
|
||||
host_vst_dispatch.shutdown(
|
||||
boost::asio::local::stream_protocol::socket::shutdown_both);
|
||||
host_vst_dispatch.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user