summaryrefslogtreecommitdiff
path: root/desktop/source/offacc/acceptor.cxx
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2010-05-17 16:42:05 +0200
committerJoachim Lingner <jl@openoffice.org>2010-05-17 16:42:05 +0200
commitfb6366086beedf9833e86db0f17a1299c84c2b28 (patch)
treece730af605ddd53ac23eb01d344dae27676aa555 /desktop/source/offacc/acceptor.cxx
parentc3d96c09018cbec80cefa6151fceda7b85dc3831 (diff)
jl152 #i77196# office hangs in smoketest when it is about to restart itself
Diffstat (limited to 'desktop/source/offacc/acceptor.cxx')
-rw-r--r--desktop/source/offacc/acceptor.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index b4ffc5aad7..17d445a1ad 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");