Skip to content

Commit 62babe9

Browse files
committed
Handle null result in CommandHelper
JAVA-1889
1 parent dc02cc7 commit 62babe9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

driver-core/src/main/com/mongodb/connection/CommandHelper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ public void onResult(final ResponseBuffers result, final Throwable t) {
157157
message.getId()), null);
158158
}
159159
} finally {
160-
result.close();
160+
if (result != null) {
161+
result.close();
162+
}
161163
}
162164
}
163165
});

0 commit comments

Comments
 (0)