Skip to content

Commit

Permalink
Don't log user initiated abort as err
Browse files Browse the repository at this point in the history
  • Loading branch information
xnorpx committed Apr 28, 2024
1 parent 5ebca66 commit 353c6cc
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/association/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
use crate::association::{
state::{AckMode, AckState, AssociationState},
stats::AssociationStats,
};
use crate::chunk::{
chunk_abort::ChunkAbort, chunk_cookie_ack::ChunkCookieAck, chunk_cookie_echo::ChunkCookieEcho,
chunk_error::ChunkError, chunk_forward_tsn::ChunkForwardTsn,
Expand All @@ -27,7 +23,14 @@ use crate::param::{
use crate::queue::{payload_queue::PayloadQueue, pending_queue::PendingQueue};
use crate::shared::{AssociationEventInner, AssociationId, EndpointEvent, EndpointEventInner};
use crate::util::{sna16lt, sna32gt, sna32gte, sna32lt, sna32lte};
use crate::{AssociationEvent, Payload, Side, Transmit};
use crate::{
association::{
state::{AckMode, AckState, AssociationState},
stats::AssociationStats,
},
chunk::USER_INITIATED_ABORT,
};
use crate::{AssociationEvent, ErrorCauseCode, Payload, Side, Transmit};
use stream::{ReliabilityType, Stream, StreamEvent, StreamId, StreamState};
use timer::{RtoManager, Timer, TimerTable, ACK_INTERVAL};

Expand Down Expand Up @@ -829,6 +832,11 @@ impl Association {
} else if let Some(c) = chunk_any.downcast_ref::<ChunkAbort>() {
let mut err_str = String::new();
for e in &c.error_causes {
if matches!(e.code, USER_INITIATED_ABORT) {
debug!("User initiated abort received");
let _ = self.close();
return Ok(());
}
err_str += &format!("({})", e);
}
return Err(Error::ErrAbortChunk(err_str));
Expand Down

0 comments on commit 353c6cc

Please # to comment.