mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 04:20:13 +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:
@@ -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