Skip to content

Commit 60c4cd5

Browse files
authored
Merge pull request #11 from xnorpx/dev/noterror
Don't log user initiated abort as err
2 parents 5ebca66 + f50197b commit 60c4cd5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/association/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::chunk::{
1111
chunk_reconfig::ChunkReconfig, chunk_selective_ack::ChunkSelectiveAck,
1212
chunk_shutdown::ChunkShutdown, chunk_shutdown_ack::ChunkShutdownAck,
1313
chunk_shutdown_complete::ChunkShutdownComplete, chunk_type::CT_FORWARD_TSN, Chunk,
14-
ErrorCauseUnrecognizedChunkType,
14+
ErrorCauseUnrecognizedChunkType, USER_INITIATED_ABORT,
1515
};
1616
use crate::config::{ServerConfig, TransportConfig, COMMON_HEADER_SIZE, DATA_CHUNK_HEADER_SIZE};
1717
use crate::error::{Error, Result};
@@ -829,6 +829,11 @@ impl Association {
829829
} else if let Some(c) = chunk_any.downcast_ref::<ChunkAbort>() {
830830
let mut err_str = String::new();
831831
for e in &c.error_causes {
832+
if matches!(e.code, USER_INITIATED_ABORT) {
833+
debug!("User initiated abort received");
834+
let _ = self.close();
835+
return Ok(());
836+
}
832837
err_str += &format!("({})", e);
833838
}
834839
return Err(Error::ErrAbortChunk(err_str));

0 commit comments

Comments
 (0)