Skip to content

Commit

Permalink
fix: filter null channel on stop to avoid NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumelamirand committed Mar 5, 2024
1 parent 1478bfd commit 3ba8c76
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import io.reactivex.rxjava3.core.SingleEmitter;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -109,6 +110,7 @@ protected void doStop() throws Exception {
.values()
.stream()
.map(channelManager::getChannelById)
.filter(Objects::nonNull)
.toList();

channels.forEach(this::channelDisconnected);
Expand Down

0 comments on commit 3ba8c76

Please sign in to comment.