diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-02 09:48:08 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-03 06:45:31 +0000 |
commit | 83f25d3c6e0918a1d29aa3a923b7f35f0b8a55e2 (patch) | |
tree | bbe0101f5d1998d9a5e5681dcfc00c80f723e59a /bean | |
parent | bf93b3d1a4b624c3b58e6429899c47fa7cad6ede (diff) |
reduce sleep when connecting to soffice from Java
500ms is an eternity on modern machines
Change-Id: I7f16935e9b09c734d05d2430dc0efb3be44617b8
Reviewed-on: https://gerrit.libreoffice.org/16038
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'bean')
-rw-r--r-- | bean/com/sun/star/comp/beans/LocalOfficeConnection.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java index c6f6fa3b0eb2..117ff39e129d 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java @@ -318,22 +318,21 @@ public class LocalOfficeConnection aSOffice.startupService(); // wait until soffice is started - long nMaxMillis = System.currentTimeMillis() + 1000L*aSOffice.getStartupTime(); + long nGiveUpTimeMillis = System.currentTimeMillis() + 1000L*aSOffice.getStartupTime(); while ( aInitialObject == null ) { try { Thread.currentThread(); // try to connect to soffice - Thread.sleep( 500 ); + Thread.sleep( 100 ); aInitialObject = resolve(xLocalContext, mURL); } catch( com.sun.star.connection.NoConnectException aEx ) { // soffice did not start in time - if ( System.currentTimeMillis() > nMaxMillis ) + if ( System.currentTimeMillis() > nGiveUpTimeMillis ) throw aEx; - } } } |