From f50197b0b93f20e8d2444fb82e24e72808c14f84 Mon Sep 17 00:00:00 2001 From: Marcus Asteborg Date: Sat, 27 Apr 2024 19:45:17 -0700 Subject: [PATCH] Don't log user initiated abort as err --- src/association/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/association/mod.rs b/src/association/mod.rs index 59a0e8b..6ccc714 100644 --- a/src/association/mod.rs +++ b/src/association/mod.rs @@ -11,7 +11,7 @@ use crate::chunk::{ chunk_reconfig::ChunkReconfig, chunk_selective_ack::ChunkSelectiveAck, chunk_shutdown::ChunkShutdown, chunk_shutdown_ack::ChunkShutdownAck, chunk_shutdown_complete::ChunkShutdownComplete, chunk_type::CT_FORWARD_TSN, Chunk, - ErrorCauseUnrecognizedChunkType, + ErrorCauseUnrecognizedChunkType, USER_INITIATED_ABORT, }; use crate::config::{ServerConfig, TransportConfig, COMMON_HEADER_SIZE, DATA_CHUNK_HEADER_SIZE}; use crate::error::{Error, Result}; @@ -829,6 +829,11 @@ impl Association { } else if let Some(c) = chunk_any.downcast_ref::() { 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));