Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
566af3ea
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
566af3ea
编写于
9月 13, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
9月 13, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16778 from taosdata/enh/addErrMsg
enh: add err msg
上级
deb017fc
6ada28b7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
9 deletion
+18
-9
source/libs/transport/src/transSvr.c
source/libs/transport/src/transSvr.c
+18
-9
未找到文件。
source/libs/transport/src/transSvr.c
浏览文件 @
566af3ea
...
@@ -907,7 +907,7 @@ static void uvDestroyConn(uv_handle_t* handle) {
...
@@ -907,7 +907,7 @@ static void uvDestroyConn(uv_handle_t* handle) {
}
}
static
void
uvPipeListenCb
(
uv_stream_t
*
handle
,
int
status
)
{
static
void
uvPipeListenCb
(
uv_stream_t
*
handle
,
int
status
)
{
if
(
status
!=
0
)
{
if
(
status
!=
0
)
{
tError
(
"server failed to init pipe
"
);
tError
(
"server failed to init pipe
, errmsg: %s"
,
uv_err_name
(
status
)
);
return
;
return
;
}
}
...
@@ -945,7 +945,10 @@ void* transInitServer(uint32_t ip, uint32_t port, char* label, int numOfThreads,
...
@@ -945,7 +945,10 @@ void* transInitServer(uint32_t ip, uint32_t port, char* label, int numOfThreads,
uv_loop_init
(
srv
->
loop
);
uv_loop_init
(
srv
->
loop
);
int
ret
=
uv_pipe_init
(
srv
->
loop
,
&
srv
->
pipeListen
,
0
);
int
ret
=
uv_pipe_init
(
srv
->
loop
,
&
srv
->
pipeListen
,
0
);
assert
(
ret
==
0
);
if
(
ret
!=
0
)
{
tError
(
"failed to init pipe, errmsg: %s"
,
uv_err_name
(
ret
));
goto
End
;
}
#ifdef WINDOWS
#ifdef WINDOWS
char
pipeName
[
64
];
char
pipeName
[
64
];
...
@@ -956,10 +959,16 @@ void* transInitServer(uint32_t ip, uint32_t port, char* label, int numOfThreads,
...
@@ -956,10 +959,16 @@ void* transInitServer(uint32_t ip, uint32_t port, char* label, int numOfThreads,
taosGetSelfPthreadId
());
taosGetSelfPthreadId
());
#endif
#endif
ret
=
uv_pipe_bind
(
&
srv
->
pipeListen
,
pipeName
);
ret
=
uv_pipe_bind
(
&
srv
->
pipeListen
,
pipeName
);
assert
(
ret
==
0
);
if
(
ret
!=
0
)
{
tError
(
"failed to bind pipe, errmsg: %s"
,
uv_err_name
(
ret
));
goto
End
;
}
ret
=
uv_listen
((
uv_stream_t
*
)
&
srv
->
pipeListen
,
SOMAXCONN
,
uvPipeListenCb
);
ret
=
uv_listen
((
uv_stream_t
*
)
&
srv
->
pipeListen
,
SOMAXCONN
,
uvPipeListenCb
);
assert
(
ret
==
0
);
if
(
ret
!=
0
)
{
tError
(
"failed to listen pipe, errmsg: %s"
,
uv_err_name
(
ret
));
goto
End
;
}
for
(
int
i
=
0
;
i
<
srv
->
numOfThreads
;
i
++
)
{
for
(
int
i
=
0
;
i
<
srv
->
numOfThreads
;
i
++
)
{
SWorkThrd
*
thrd
=
(
SWorkThrd
*
)
taosMemoryCalloc
(
1
,
sizeof
(
SWorkThrd
));
SWorkThrd
*
thrd
=
(
SWorkThrd
*
)
taosMemoryCalloc
(
1
,
sizeof
(
SWorkThrd
));
...
@@ -1082,12 +1091,12 @@ void transCloseServer(void* arg) {
...
@@ -1082,12 +1091,12 @@ void transCloseServer(void* arg) {
if
(
srv
->
inited
)
{
if
(
srv
->
inited
)
{
uv_async_send
(
srv
->
pAcceptAsync
);
uv_async_send
(
srv
->
pAcceptAsync
);
taosThreadJoin
(
srv
->
thread
,
NULL
);
taosThreadJoin
(
srv
->
thread
,
NULL
);
}
SRV_RELEASE_UV
(
srv
->
loop
);
SRV_RELEASE_UV
(
srv
->
loop
);
for
(
int
i
=
0
;
i
<
srv
->
numOfThreads
;
i
++
)
{
for
(
int
i
=
0
;
i
<
srv
->
numOfThreads
;
i
++
)
{
sendQuitToWorkThrd
(
srv
->
pThreadObj
[
i
]);
sendQuitToWorkThrd
(
srv
->
pThreadObj
[
i
]);
destroyWorkThrd
(
srv
->
pThreadObj
[
i
]);
destroyWorkThrd
(
srv
->
pThreadObj
[
i
]);
}
}
}
taosMemoryFree
(
srv
->
pThreadObj
);
taosMemoryFree
(
srv
->
pThreadObj
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录