提交 4b8c360e authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

cosmetic

上级 e9d4c60d
......@@ -229,7 +229,7 @@ void TcpConnection::Write(const uint8_t* data, size_t len, TcpConnection::onSend
// Set written to 0 so pendingLen can be properly calculated.
written = 0;
}
// Error. Should not happen.
// Any other error.
else if (written < 0)
{
MS_WARN_DEV("uv_try_write() failed, trying uv_write(): %s", uv_strerror(written));
......@@ -333,7 +333,7 @@ void TcpConnection::Write(
// Set written to 0 so pendingLen can be properly calculated.
written = 0;
}
// Error. Should not happen.
// Any other error.
else if (written < 0)
{
MS_WARN_DEV("uv_try_write() failed, trying uv_write(): %s", uv_strerror(written));
......
......@@ -160,7 +160,7 @@ void UdpSocket::Send(
return;
}
if (sent >= 0)
else if (sent >= 0)
{
MS_WARN_DEV("datagram truncated (just %d of %zu bytes were sent)", sent, len);
......@@ -176,8 +176,8 @@ void UdpSocket::Send(
return;
}
// Error,
if (sent != UV_EAGAIN)
// Any error but legit EAGAIN. Use uv_udp_send().
else if (sent != UV_EAGAIN)
{
MS_WARN_DEV("uv_udp_send() failed, trying uv_udp_send(): %s", uv_strerror(sent));
}
......
......@@ -186,7 +186,7 @@ void UnixStreamSocket::Write(const uint8_t* data, size_t len)
// Set written to 0 so pendingLen can be properly calculated.
written = 0;
}
// Error. Should not happen.
// Any other error.
else if (written < 0)
{
MS_WARN_DEV("uv_try_write() failed, trying uv_write(): %s", uv_strerror(written));
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论