Skip to content

Commit

Permalink
Update TopicLookupBase.java
Browse files Browse the repository at this point in the history
[Bug] Fix lookupRequestSemaphore leak when topic not found via http protocol
  • Loading branch information
pengxiangrui127 committed Nov 30, 2023
1 parent 5c89188 commit 0b6804d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ protected CompletableFuture<LookupData> internalLookupTopicAsync(final TopicName
})
.thenCompose(exist -> {
if (!exist) {
pulsar().getBrokerService().getLookupRequestSemaphore().release();
throw new RestException(Response.Status.NOT_FOUND,
String.format("Topic not found %s", topicName.toString()));
}
Expand Down

0 comments on commit 0b6804d

Please sign in to comment.