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
yngrtc committed Apr 28, 2024
1 parent 98b4ec4 commit 4bee644
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rtc-sctp/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::packet::{CommonHeader, Packet};
Expand Down Expand Up @@ -834,6 +834,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 4bee644

Please sign in to comment.