Skip to content

Commit

Permalink
forward_buffered_packets return packet count in error path (#23167) (#…
Browse files Browse the repository at this point in the history
…23187)

(cherry picked from commit 115d715)

Co-authored-by: Jeff Biseda <[email protected]>
  • Loading branch information
mergify[bot] and jbiseda authored Feb 16, 2022
1 parent e343a17 commit 8b12749
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,9 @@ impl BankingStage {

if !packet_vec.is_empty() {
inc_new_counter_info!("banking_stage-forwarded_packets", packet_vec.len());
if let Err(SendPktsError::IoError(ioerr, _num_failed)) = batch_send(socket, &packet_vec)
if let Err(SendPktsError::IoError(ioerr, num_failed)) = batch_send(socket, &packet_vec)
{
return (Err(ioerr), 0);
return (Err(ioerr), packet_vec.len().saturating_sub(num_failed));
}
}

Expand Down

0 comments on commit 8b12749

Please sign in to comment.