We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbc50b0 commit 2801defCopy full SHA for 2801def
pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawReaderImpl.java
@@ -218,7 +218,10 @@ protected CompletableFuture<Void> failPendingReceive() {
218
private void failPendingRawReceives() {
219
List<CompletableFuture<RawMessage>> toError = new ArrayList<>();
220
while (!pendingRawReceives.isEmpty()) {
221
- toError.add(pendingRawReceives.remove());
+ final CompletableFuture<RawMessage> ret = pendingRawReceives.poll();
222
+ if (ret != null) {
223
+ toError.add(ret);
224
+ }
225
}
226
toError.forEach((f) -> f.cancel(false));
227
0 commit comments