summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2015-07-15 17:42:23 +0200
committerSimon Rettberg2015-07-15 17:42:23 +0200
commitb294667dabc26768bc67b751fe5ecb48937ce8ca (patch)
tree10ae062a44af9a9e3729238f297bf3f9f72daaa4
parentAdapt to changed thrift api for improved session validation (diff)
downloadtutor-module-b294667dabc26768bc67b751fe5ecb48937ce8ca.tar.gz
tutor-module-b294667dabc26768bc67b751fe5ecb48937ce8ca.tar.xz
tutor-module-b294667dabc26768bc67b751fe5ecb48937ce8ca.zip
[client] always retry thrift call automatically on first failure
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java5
1 files changed, 4 insertions, 1 deletions
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<Boolean>() {
@Override
public Boolean run() {