Skip to content
This repository was archived by the owner on Dec 31, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/java/io/nats/streaming/StreamingConnectionImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ void close(boolean silent) throws IOException, InterruptedException {
for (AckClosure ac : this.pubAckMap.values()) {
ac.ackTask.cancel();

if (!ac.ch.isEmpty()) {
// Note: Providing an Ack Handler when publishing to STAN (on Android) can result in NPEs during some closing scenarios
if (ac.ch != null && !ac.ch.isEmpty()) {
ac.ch.take();
}
}
Expand Down