summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-09-09 21:20:01 +0200
committerMichael Stahl <mstahl@redhat.com>2013-09-09 22:09:18 +0200
commite658caeda9e98f001eec06495dc15d3687f345e9 (patch)
treebf90ee479075a6c9a58762776a2de0bb0879bbd4 /desktop
parent3782ae0bc43431133871b168008e50924eb55d32 (diff)
Extension Manager: surely we should be able to spawn uno ...
... in finite time; waiting forever may hang the smoktetest in case uno fails to start. Change-Id: I42be4cecb8eec82df8f2df63f02e1223e4933626
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 2f8eb55c679c..17c4fb2a3e44 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -444,7 +444,7 @@ Reference<XInterface> resolveUnoURL(
Reference<bridge::XUnoUrlResolver> xUnoUrlResolver(
bridge::UnoUrlResolver::create( xLocalContext ) );
- for (;;)
+ for (int i = 0; i <= 20; ++i) // 10 seconds
{
if (abortChannel != 0 && abortChannel->isAborted()) {
throw ucb::CommandAbortedException(
@@ -454,10 +454,15 @@ Reference<XInterface> resolveUnoURL(
return xUnoUrlResolver->resolve( connectString );
}
catch (const connection::NoConnectException &) {
- TimeValue tv = { 0 /* secs */, 500000000 /* nanosecs */ };
- ::osl::Thread::wait( tv );
+ if (i < 20)
+ {
+ TimeValue tv = { 0 /* secs */, 500000000 /* nanosecs */ };
+ ::osl::Thread::wait( tv );
+ }
+ else throw;
}
}
+ return 0; // warning C4715
}
#ifdef WNT