Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
138b7f38
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
138b7f38
编写于
5月 23, 2020
作者:
陶建辉(Jeff)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-364] broken link is not handled in right way
上级
9a8a0285
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
11 addition
and
9 deletion
+11
-9
src/rpc/src/rpcMain.c
src/rpc/src/rpcMain.c
+2
-3
src/rpc/src/rpcTcp.c
src/rpc/src/rpcTcp.c
+7
-6
src/rpc/test/rserver.c
src/rpc/test/rserver.c
+2
-0
未找到文件。
src/rpc/src/rpcMain.c
浏览文件 @
138b7f38
...
...
@@ -867,9 +867,8 @@ static void *rpcProcessMsgFromPeer(SRecvInfo *pRecv) {
// underlying UDP layer does not know it is server or client
pRecv
->
connType
=
pRecv
->
connType
|
pRpc
->
connType
;
if
(
pRecv
->
ip
==
0
&&
pConn
)
{
if
(
pRecv
->
ip
==
0
&&
pConn
)
{
rpcProcessBrokenLink
(
pConn
);
rpcFreeMsg
(
pRecv
->
msg
);
return
NULL
;
}
...
...
src/rpc/src/rpcTcp.c
浏览文件 @
138b7f38
...
...
@@ -215,7 +215,6 @@ static void* taosAcceptTcpConnection(void *arg) {
continue
;
}
tTrace
(
"%s TCP connection from ip:%s:%hu"
,
pServerObj
->
label
,
inet_ntoa
(
caddr
.
sin_addr
),
caddr
.
sin_port
);
taosKeepTcpAlive
(
connFd
);
// pick up the thread to handle this connection
...
...
@@ -229,7 +228,8 @@ static void* taosAcceptTcpConnection(void *arg) {
inet_ntoa
(
caddr
.
sin_addr
),
pFdObj
->
port
,
pFdObj
,
pThreadObj
->
numOfFds
);
}
else
{
close
(
connFd
);
tError
(
"%s failed to malloc FdObj(%s)"
,
pServerObj
->
label
,
strerror
(
errno
));
tError
(
"%s failed to malloc FdObj(%s) for connection from:%s:%hu"
,
pServerObj
->
label
,
strerror
(
errno
),
inet_ntoa
(
caddr
.
sin_addr
),
caddr
.
sin_port
);
}
// pick up next thread for next connection
...
...
@@ -341,6 +341,8 @@ static void taosReportBrokenLink(SFdObj *pFdObj) {
recvInfo
.
chandle
=
NULL
;
recvInfo
.
connType
=
RPC_CONN_TCP
;
(
*
(
pThreadObj
->
processData
))(
&
recvInfo
);
}
else
{
taosFreeFdObj
(
pFdObj
);
}
}
...
...
@@ -416,7 +418,6 @@ static void *taosProcessTcpData(void *param) {
recvInfo
.
connType
=
RPC_CONN_TCP
;
pFdObj
->
thandle
=
(
*
(
pThreadObj
->
processData
))(
&
recvInfo
);
if
(
pFdObj
->
thandle
==
NULL
)
taosFreeFdObj
(
pFdObj
);
}
}
...
...
@@ -466,7 +467,7 @@ static void taosFreeFdObj(SFdObj *pFdObj) {
pFdObj
->
signature
=
NULL
;
epoll_ctl
(
pThreadObj
->
pollFd
,
EPOLL_CTL_DEL
,
pFdObj
->
fd
,
NULL
);
close
(
pFdObj
->
fd
);
taosCloseTcpSocket
(
pFdObj
->
fd
);
pThreadObj
->
numOfFds
--
;
...
...
src/rpc/test/rserver.c
浏览文件 @
138b7f38
...
...
@@ -127,6 +127,8 @@ int main(int argc, char *argv[]) {
SRpcInit
rpcInit
;
char
dataName
[
20
]
=
"server.data"
;
taosBlockSIGPIPE
();
memset
(
&
rpcInit
,
0
,
sizeof
(
rpcInit
));
rpcInit
.
localPort
=
7000
;
rpcInit
.
label
=
"SER"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录