Skip to content

Commit a5d7a19

Browse files
author
Norman Maurer
committed
Merge pull request #26 from danthegoodman/master
Stop throws NPE if exception occurs in construction
2 parents 287e8a7 + 55f4fb9 commit a5d7a19

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/vertx/mods/MongoPersistor.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ public void start() {
7474
}
7575

7676
public void stop() {
77-
mongo.close();
77+
if(mongo != null) {
78+
mongo.close();
79+
}
7880
}
7981

8082
public void handle(Message<JsonObject> message) {

0 commit comments

Comments
 (0)