Commit 3c340fdb authored by Marco Descher's avatar Marco Descher
Browse files

[23035] Add missing lock release to e4.AcquireLockBlockingUi

parent 249d9973
Pipeline #22118 passed with stages
in 4 minutes and 22 seconds
......@@ -11,12 +11,19 @@ import org.slf4j.LoggerFactory;
import ch.elexis.core.lock.types.LockResponse;
import ch.elexis.core.model.Identifiable;
import ch.elexis.core.services.IElexisServerService.ConnectionStatus;
import ch.elexis.core.services.holder.ElexisServerServiceHolder;
import ch.elexis.core.services.holder.LocalLockServiceHolder;
public class AcquireLockBlockingUi {
private static Logger logger = LoggerFactory.getLogger(AcquireLockBlockingUi.class);
public static void aquireAndRun(Identifiable identifiable, ILockHandler handler){
if (ElexisServerServiceHolder.get().getConnectionStatus() == ConnectionStatus.STANDALONE) {
handler.lockAcquired();
return;
}
Display display = Display.getDefault();
display.syncExec(new Runnable() {
......@@ -59,6 +66,7 @@ public class AcquireLockBlockingUi {
}
});
monitor.beginTask("Releasing lock ...", IProgressMonitor.UNKNOWN);
LocalLockServiceHolder.get().releaseLock(result.getLockInfo());
monitor.done();
} else {
display.syncExec(new Runnable() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment