Skip to content

Commit

Permalink
Return early if http client is already closed
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo committed Dec 3, 2024
1 parent 4181ea6 commit 4de3e5a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ Map<URI, HttpPageBufferClient> getAllClients()

private boolean addPages(HttpPageBufferClient client, List<Slice> pages)
{
checkState(!completedClients.contains(client), "client is already marked as completed");
// If client is already completed, addPages is a no-op
if (completedClients.contains(client)) {
return false;
}

// Compute stats before acquiring the lock
long responseSize = 0;
if (!pages.isEmpty()) {
Expand Down

0 comments on commit 4de3e5a

Please sign in to comment.