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 f50197b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/association/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -829,6 +829,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 f50197b

Please sign in to comment.