Skip to content

Commit 353c6cc

Browse files
committedApr 28, 2024
Don't log user initiated abort as err
1 parent 5ebca66 commit 353c6cc

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed
 

‎src/association/mod.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
use crate::association::{
2-
state::{AckMode, AckState, AssociationState},
3-
stats::AssociationStats,
4-
};
51
use crate::chunk::{
62
chunk_abort::ChunkAbort, chunk_cookie_ack::ChunkCookieAck, chunk_cookie_echo::ChunkCookieEcho,
73
chunk_error::ChunkError, chunk_forward_tsn::ChunkForwardTsn,
@@ -27,7 +23,14 @@ use crate::param::{
2723
use crate::queue::{payload_queue::PayloadQueue, pending_queue::PendingQueue};
2824
use crate::shared::{AssociationEventInner, AssociationId, EndpointEvent, EndpointEventInner};
2925
use crate::util::{sna16lt, sna32gt, sna32gte, sna32lt, sna32lte};
30-
use crate::{AssociationEvent, Payload, Side, Transmit};
26+
use crate::{
27+
association::{
28+
state::{AckMode, AckState, AssociationState},
29+
stats::AssociationStats,
30+
},
31+
chunk::USER_INITIATED_ABORT,
32+
};
33+
use crate::{AssociationEvent, ErrorCauseCode, Payload, Side, Transmit};
3134
use stream::{ReliabilityType, Stream, StreamEvent, StreamId, StreamState};
3235
use timer::{RtoManager, Timer, TimerTable, ACK_INTERVAL};
3336

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

0 commit comments

Comments
 (0)