diff options
Diffstat (limited to 'desktop/source/offacc/acceptor.cxx')
-rw-r--r-- | desktop/source/offacc/acceptor.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx index 4eee12f5949a..4e100fd99665 100644 --- a/desktop/source/offacc/acceptor.cxx +++ b/desktop/source/offacc/acceptor.cxx @@ -67,6 +67,7 @@ Acceptor::Acceptor( const Reference< XMultiServiceFactory >& rFactory ) , m_aConnectString() , m_aProtocol() , m_bInit(sal_False) + , m_bDying(false) { m_rSMgr = rFactory; m_rAcceptor = Reference< XAcceptor > (m_rSMgr->createInstance( @@ -88,6 +89,9 @@ Acceptor::~Acceptor() osl::MutexGuard g(m_aMutex); t = m_thread; } + //prevent locking if the thread is still waiting + m_bDying = true; + m_cEnable.set(); osl_joinWithThread(t); { // Make the final state of m_bridges visible to this thread (since @@ -117,6 +121,8 @@ void SAL_CALL Acceptor::run() RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109)"\ "Acceptor::run waiting for office to come up"); m_cEnable.wait(); + if (m_bDying) //see destructor + break; RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109)"\ "Acceptor::run now enabled and continuing"); |