forward_buffered_packets return packet count in error path (#23167)

This commit is contained in:
Jeff Biseda 2022-02-16 07:46:32 -08:00 committed by GitHub
parent c2435363f3
commit 115d71536b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -484,9 +484,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));
}
}