提交 a85fb8c9 authored 作者: José Luis Millán's avatar José Luis Millán

SctpAssociation: don't warn if SCTP send buffer is full

Since it is not an error.
上级 ec31a8d5
# Changelog # Changelog
### 3.7.6 (WIP)
* SctpAssociation: don't warn if SCTP send buffer is full.
### 3.7.5 ### 3.7.5
* SctpAssociation: provide 'sctpsendbufferfull' reason on send error (#552). * SctpAssociation: provide 'sctpsendbufferfull' reason on send error (#552).
......
...@@ -438,16 +438,30 @@ namespace RTC ...@@ -438,16 +438,30 @@ namespace RTC
if (ret < 0) if (ret < 0)
{ {
MS_WARN_TAG(
sctp,
"error sending SCTP message [sid:%" PRIu16 ", ppid:%" PRIu32 ", message size:%zu]: %s",
parameters.streamId,
ppid,
len,
std::strerror(errno));
bool sctpSendBufferFull = errno == EWOULDBLOCK || errno == EAGAIN; bool sctpSendBufferFull = errno == EWOULDBLOCK || errno == EAGAIN;
// SCTP send buffer being full is legit, not an error.
if (sctpSendBufferFull)
{
MS_DEBUG_DEV(
sctp,
"error sending SCTP message [sid:%" PRIu16 ", ppid:%" PRIu32 ", message size:%zu]: %s",
parameters.streamId,
ppid,
len,
std::strerror(errno));
}
else
{
MS_WARN_TAG(
sctp,
"error sending SCTP message [sid:%" PRIu16 ", ppid:%" PRIu32 ", message size:%zu]: %s",
parameters.streamId,
ppid,
len,
std::strerror(errno));
}
if (cb) if (cb)
{ {
(*cb)(false, sctpSendBufferFull); (*cb)(false, sctpSendBufferFull);
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论