Skip to content

Commit

Permalink
[Pfc] Do early exit when prefetching of a block fails with no other s…
Browse files Browse the repository at this point in the history
…ubscribers.
  • Loading branch information
osschar committed Aug 1, 2022
1 parent bad6ba6 commit af9b7e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/XrdPfc/XrdPfcFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1286,10 +1286,12 @@ void File::ProcessBlockResponse(Block *b, int res)
}
}

// If failed with no subscribers -- remove the block now.
// If failed with no subscribers -- delete the block and exit.
if (b->m_refcnt == 0 && (res < 0 || m_in_shutdown))
{
free_block(b);
m_state_cond.UnLock();
return;
}
}
else
Expand Down

0 comments on commit af9b7e4

Please sign in to comment.