Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
8986f1b9
提交
8986f1b9
authored
1月 09, 2017
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix missing brackets
上级
4cd365ec
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
15 行增加
和
18 行删除
+15
-18
TcpConnection.cpp
worker/src/handles/TcpConnection.cpp
+7
-9
UnixStreamSocket.cpp
worker/src/handles/UnixStreamSocket.cpp
+8
-9
没有找到文件。
worker/src/handles/TcpConnection.cpp
浏览文件 @
8986f1b9
...
@@ -380,16 +380,10 @@ void TcpConnection::onUvWriteError(int error)
...
@@ -380,16 +380,10 @@ void TcpConnection::onUvWriteError(int error)
if
(
this
->
isClosing
)
if
(
this
->
isClosing
)
return
;
return
;
if
(
error
==
UV_EPIPE
||
error
==
UV_ENOTCONN
)
if
(
error
!=
UV_EPIPE
&&
error
!=
UV_ENOTCONN
)
{
MS_WARN_DEV
(
"write error, closing the connection: %s"
,
uv_strerror
(
error
));
}
else
{
MS_WARN_DEV
(
"write error, closing the connection: %s"
,
uv_strerror
(
error
));
this
->
hasError
=
true
;
this
->
hasError
=
true
;
}
MS_WARN_DEV
(
"write error, closing the connection: %s"
,
uv_strerror
(
error
));
Close
();
Close
();
}
}
...
@@ -402,9 +396,13 @@ void TcpConnection::onUvShutdown(uv_shutdown_t* req, int status)
...
@@ -402,9 +396,13 @@ void TcpConnection::onUvShutdown(uv_shutdown_t* req, int status)
delete
req
;
delete
req
;
if
(
status
==
UV_EPIPE
||
status
==
UV_ENOTCONN
||
status
==
UV_ECANCELED
)
if
(
status
==
UV_EPIPE
||
status
==
UV_ENOTCONN
||
status
==
UV_ECANCELED
)
{
MS_WARN_DEV
(
"shutdown error: %s"
,
uv_strerror
(
status
));
MS_WARN_DEV
(
"shutdown error: %s"
,
uv_strerror
(
status
));
}
else
if
(
status
)
else
if
(
status
)
{
MS_WARN_DEV
(
"shutdown error: %s"
,
uv_strerror
(
status
));
MS_WARN_DEV
(
"shutdown error: %s"
,
uv_strerror
(
status
));
}
// Now do close the handle.
// Now do close the handle.
uv_close
((
uv_handle_t
*
)
this
->
uvHandle
,
(
uv_close_cb
)
on_close
);
uv_close
((
uv_handle_t
*
)
this
->
uvHandle
,
(
uv_close_cb
)
on_close
);
...
...
worker/src/handles/UnixStreamSocket.cpp
浏览文件 @
8986f1b9
...
@@ -173,6 +173,7 @@ void UnixStreamSocket::Write(const uint8_t* data, size_t len)
...
@@ -173,6 +173,7 @@ void UnixStreamSocket::Write(const uint8_t* data, size_t len)
else
if
(
written
<
0
)
else
if
(
written
<
0
)
{
{
MS_ERROR_STD
(
"uv_try_write() failed, closing the socket: %s"
,
uv_strerror
(
written
));
MS_ERROR_STD
(
"uv_try_write() failed, closing the socket: %s"
,
uv_strerror
(
written
));
Close
();
Close
();
return
;
return
;
}
}
...
@@ -262,16 +263,10 @@ void UnixStreamSocket::onUvWriteError(int error)
...
@@ -262,16 +263,10 @@ void UnixStreamSocket::onUvWriteError(int error)
if
(
this
->
isClosing
)
if
(
this
->
isClosing
)
return
;
return
;
if
(
error
==
UV_EPIPE
||
error
==
UV_ENOTCONN
)
if
(
error
!=
UV_EPIPE
&&
error
!=
UV_ENOTCONN
)
{
MS_ERROR_STD
(
"write error, closing the pipe: %s"
,
uv_strerror
(
error
));
}
else
{
MS_ERROR_STD
(
"write error, closing the pipe: %s"
,
uv_strerror
(
error
));
this
->
hasError
=
true
;
this
->
hasError
=
true
;
}
MS_ERROR_STD
(
"write error, closing the pipe: %s"
,
uv_strerror
(
error
));
Close
();
Close
();
}
}
...
@@ -284,9 +279,13 @@ void UnixStreamSocket::onUvShutdown(uv_shutdown_t* req, int status)
...
@@ -284,9 +279,13 @@ void UnixStreamSocket::onUvShutdown(uv_shutdown_t* req, int status)
delete
req
;
delete
req
;
if
(
status
==
UV_EPIPE
||
status
==
UV_ENOTCONN
||
status
==
UV_ECANCELED
)
if
(
status
==
UV_EPIPE
||
status
==
UV_ENOTCONN
||
status
==
UV_ECANCELED
)
{
MS_ERROR_STD
(
"shutdown error: %s"
,
uv_strerror
(
status
));
MS_ERROR_STD
(
"shutdown error: %s"
,
uv_strerror
(
status
));
}
else
if
(
status
)
else
if
(
status
)
{
MS_ERROR_STD
(
"shutdown error: %s"
,
uv_strerror
(
status
));
MS_ERROR_STD
(
"shutdown error: %s"
,
uv_strerror
(
status
));
}
// Now do close the handle.
// Now do close the handle.
uv_close
((
uv_handle_t
*
)
this
->
uvHandle
,
(
uv_close_cb
)
on_close
);
uv_close
((
uv_handle_t
*
)
this
->
uvHandle
,
(
uv_close_cb
)
on_close
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论