]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java
Defer change set disposal in State.commitWriteTransaction
[simantics/platform.git] / bundles / org.simantics.db.procore / src / fi / vtt / simantics / procore / internal / State.java
index 3199901e90e191962c5815b6bde1623e39cda4f8..91faa719841a534ba5636a815ff1f137dc069368 100644 (file)
@@ -332,7 +332,6 @@ class State {
                 // deny can always remove a persistent statement. 
                 clusterStream.reallyFlush();
 
-                Disposable.safeDispose(session.clientChanges);
                 session.clientChanges = new ClientChangesImpl(session);
 
 
@@ -385,6 +384,7 @@ class State {
             this.close(); // Everything is lost anyway.
             throw new IllegalStateException(e);
         } finally {
+            Disposable.safeDispose(cs);
             lock.unlock();
         }
     }