Skip to content

Commit

Permalink
fix: close redundant proxy request account
Browse files Browse the repository at this point in the history
  • Loading branch information
bishalbikram committed Oct 18, 2024
1 parent f45ede8 commit 7cc4e80
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ pub fn handle_request(
pending_request.sources.push(source.owner.to_owned())
}
if pending_request.sources.len() != req.protocols().len() {
// close the proxy request as it's no longer needed
ctx.accounts
.proxy_request
.close(ctx.accounts.signer.to_account_info())?;

return Ok(());
}
pending_request.close(ctx.accounts.admin.clone())?;
Expand Down

0 comments on commit 7cc4e80

Please sign in to comment.