Skip to content

Commit

Permalink
null check
Browse files Browse the repository at this point in the history
  • Loading branch information
Roiocam committed Aug 15, 2024
1 parent 7654fe2 commit 2ae4fcc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ public CompletableFuture<Void> close() {

for (K k : connections.keySet()) {
Sync<K, T, F> remove = connections.remove(k);
remove.doWithConnection(e -> futures.add(e.closeAsync()));
if (remove != null) {
remove.doWithConnection(e -> futures.add(e.closeAsync()));
}
}

return Futures.allOf(futures);
Expand Down

0 comments on commit 2ae4fcc

Please sign in to comment.