refactoring

pull/4879/head
Nikita Koksharov 2 years ago
parent c57230a747
commit 894112b3f0

@ -746,9 +746,7 @@ public class PublishSubscribeService {
Collection<MasterSlaveEntry> entries = name2entry.getOrDefault(channelName, Collections.emptySet()); Collection<MasterSlaveEntry> entries = name2entry.getOrDefault(channelName, Collections.emptySet());
if (entries.isEmpty()) { if (entries.isEmpty()) {
semaphore.release(); semaphore.release();
CompletableFuture<Void> f = new CompletableFuture<>(); return CompletableFuture.completedFuture(null);
f.completeExceptionally(new IllegalStateException("Unable to find entry for channel: " + channelName));
return f;
} }
List<CompletableFuture<?>> futures = new ArrayList<>(entries.size()); List<CompletableFuture<?>> futures = new ArrayList<>(entries.size());

Loading…
Cancel
Save