Skip to content

Commit

Permalink
add close for example
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole00 committed Jun 17, 2021
1 parent 85855fc commit 3d3454a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ public static void main(String[] args) {
client.connect();
} catch (Exception e) {
LOGGER.error("storage client connect error, ", e);
client.close();
System.exit(1);
}
scanVertex(client);
scanEdge(client);

client.close();
}

/**
Expand All @@ -53,6 +56,7 @@ public static void scanVertex(StorageClient client) {
result = iterator.next();
} catch (Exception e) {
LOGGER.error("scan error, ", e);
client.close();
System.exit(1);
}
if (result.isEmpty()) {
Expand Down Expand Up @@ -99,6 +103,7 @@ public static void scanEdge(StorageClient client) {
result = iterator.next();
} catch (Exception e) {
LOGGER.error("scan error, ", e);
client.close();
System.exit(1);
}
if (result.isEmpty()) {
Expand Down

0 comments on commit 3d3454a

Please sign in to comment.