Break if acceptor throws ConnectionSetupException.

If the acceptor throws a ConnectionSetupException, assume
the connection is invalid and break out of the run method
to avoid busy looping the failure.

Change-Id: I67d17a34806f6210518f7a683e5d68a5d9b685f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191842
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Casey Harkins
2025-10-06 10:18:26 +02:00
committed by Stephan Bergmann
parent 38eba85f3a
commit cd72a672c9
+4
View File
@@ -22,6 +22,7 @@
#include "acceptor.hxx"
#include <com/sun/star/bridge/BridgeFactory.hpp>
#include <com/sun/star/connection/Acceptor.hpp>
#include <com/sun/star/connection/ConnectionSetupException.hpp>
#include <com/sun/star/uno/XNamingService.hpp>
#include <officecfg/Office/Security.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -121,6 +122,9 @@ void Acceptor::run()
// the bridge, it will be destructed.
m_bridges.add(m_rBridgeFactory->createBridge(
u""_ustr, m_aProtocol, rConnection, rInstanceProvider));
} catch (const ConnectionSetupException&) {
TOOLS_WARN_EXCEPTION("desktop.offacc", "");
break;
} catch (const Exception&) {
TOOLS_WARN_EXCEPTION("desktop.offacc", "");
// connection failed...