Merge changes from topic 'blueprint'
[netconf.git] / netconf / netconf-topology-singleton / src / main / java / org / opendaylight / netconf / topology / singleton / impl / tx / NetconfMasterDOMTransaction.java
index 33680f2dfc2701212e17ae068b54a82f04528d74..356b3bf705d7decb20887922211cf679ae059145 100644 (file)
@@ -152,18 +152,18 @@ public class NetconfMasterDOMTransaction implements NetconfDOMTransaction {
         LOG.trace("{}: Submit[{}} via NETCONF", id, writeTx.getIdentifier());
 
         final CheckedFuture<Void, TransactionCommitFailedException> submitFuture = writeTx.submit();
+        writeTx = null;
+
         final DefaultPromise<Void> promise = new DefaultPromise<>();
         Futures.addCallback(submitFuture, new FutureCallback<Void>() {
             @Override
             public void onSuccess(final Void result) {
                 promise.success(result);
-                writeTx = null;
             }
 
             @Override
             public void onFailure(@Nonnull final Throwable throwable) {
                 promise.failure(throwable);
-                writeTx = null;
             }
         });
         return promise.future();