From b294667dabc26768bc67b751fe5ecb48937ce8ca Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 15 Jul 2015 17:42:23 +0200 Subject: [client] always retry thrift call automatically on first failure --- dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java index c7135d66..2c50bc2e 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java @@ -138,7 +138,10 @@ public abstract class MainWindow { ThriftManager.setErrorCallback(new ErrorCallback() { @Override public boolean thriftError(int failCount, String method, final Throwable t) { - // Ask user if we should retry + // if it's the first fail, retry immediately + if (failCount == 1) + return true; + // Otherwise, ask user if we should retry return Gui.syncExec(new GuiCallable() { @Override public Boolean run() { -- cgit v1.2.3-55-g7522