提交 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).
......
...@@ -437,6 +437,21 @@ namespace RTC ...@@ -437,6 +437,21 @@ namespace RTC
this->socket, msg, len, nullptr, 0, &spa, static_cast<socklen_t>(sizeof(spa)), SCTP_SENDV_SPA, 0); this->socket, msg, len, nullptr, 0, &spa, static_cast<socklen_t>(sizeof(spa)), SCTP_SENDV_SPA, 0);
if (ret < 0) if (ret < 0)
{
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( MS_WARN_TAG(
sctp, sctp,
...@@ -445,8 +460,7 @@ namespace RTC ...@@ -445,8 +460,7 @@ namespace RTC
ppid, ppid,
len, len,
std::strerror(errno)); std::strerror(errno));
}
bool sctpSendBufferFull = errno == EWOULDBLOCK || errno == EAGAIN;
if (cb) if (cb)
{ {
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论