From e067bbbfbc99cb70f34e01c7cd7a352ac3d3a486 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 26 Oct 2020 17:44:01 +0100 Subject: [PATCH] Don't stop the whole IO context This would break plugin groups since the different plugins share a single IO context. --- src/common/communication.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/communication.h b/src/common/communication.h index d364f0a9..658a8fab 100644 --- a/src/common/communication.h +++ b/src/common/communication.h @@ -442,7 +442,7 @@ class EventHandler { // sure all outstanding jobs have been processed and then drop all work // from the IO context std::lock_guard lock(active_secondary_requests_mutex); - io_context.stop(); + acceptor.reset(); } private: @@ -471,13 +471,14 @@ class EventHandler { const boost::system::error_code& error, boost::asio::local::stream_protocol::socket secondary_socket) { if (error.failed()) { + // On the Wine side it's expected that the main socket + // connection will be dropped during shutdown, so we can + // silently ignore any related socket errors on the Wine + // side if (logging) { auto [logger, is_dispatch] = *logging; logger.log("Failure while accepting connections: " + error.message()); - } else { - std::cerr << "Failure while accepting connections: " - << error.message() << std::endl; } return;