X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph.db%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fdb%2FTransferableGraphs.java;fp=bundles%2Forg.simantics.graph.db%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fdb%2FTransferableGraphs.java;h=42bae14bf0a989b545fac4980c831b159e489fae;hb=a472ceaa29534d553e2af893e268b6a13bffa441;hp=7b1a177045a0f4537299282f7a07c7e50fc8c32c;hpb=c27fef7b9c12582d5eb3a66456eb32cee6c80860;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java index 7b1a17704..42bae14bf 100644 --- a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java +++ b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java @@ -494,7 +494,7 @@ public class TransferableGraphs { private static void writeTransferableGraph(RequestProcessor processor, final TransferableGraphSource source, final RandomAccessBinary out, TGStatusMonitor monitor) throws Exception { long start = System.nanoTime(); - + try { final Serializer datatypeSerializer = Bindings.getSerializerUnchecked(Datatype.class); final Serializer identitySerializer = Bindings.getSerializerUnchecked(Identity.class); final Serializer extensionSerializer = Bindings.getSerializerUnchecked(Extensions.class); @@ -595,6 +595,9 @@ public class TransferableGraphs { } } }); + } finally { + source.close(); + } long end = System.nanoTime(); LOGGER.info("Wrote transferable graph in {} seconds.", 1e-9*(end-start));