[TD-800] crash while connect failed
This commit is contained in:
parent
ee4e4aaa9c
commit
555206e9b1
|
@ -281,6 +281,7 @@ static int32_t mnodeProcessHeartBeatMsg(SMnodeMsg *pMsg) {
|
||||||
|
|
||||||
static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) {
|
static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) {
|
||||||
SCMConnectMsg *pConnectMsg = pMsg->rpcMsg.pCont;
|
SCMConnectMsg *pConnectMsg = pMsg->rpcMsg.pCont;
|
||||||
|
SCMConnectRsp *pConnectRsp = NULL;
|
||||||
int32_t code = TSDB_CODE_SUCCESS;
|
int32_t code = TSDB_CODE_SUCCESS;
|
||||||
|
|
||||||
SRpcConnInfo connInfo;
|
SRpcConnInfo connInfo;
|
||||||
|
@ -309,7 +310,7 @@ static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) {
|
||||||
mnodeDecDbRef(pDb);
|
mnodeDecDbRef(pDb);
|
||||||
}
|
}
|
||||||
|
|
||||||
SCMConnectRsp *pConnectRsp = rpcMallocCont(sizeof(SCMConnectRsp));
|
pConnectRsp = rpcMallocCont(sizeof(SCMConnectRsp));
|
||||||
if (pConnectRsp == NULL) {
|
if (pConnectRsp == NULL) {
|
||||||
code = TSDB_CODE_MND_OUT_OF_MEMORY;
|
code = TSDB_CODE_MND_OUT_OF_MEMORY;
|
||||||
goto connect_over;
|
goto connect_over;
|
||||||
|
@ -332,7 +333,7 @@ static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) {
|
||||||
|
|
||||||
connect_over:
|
connect_over:
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
rpcFreeCont(pConnectRsp);
|
if (pConnectRsp) rpcFreeCont(pConnectRsp);
|
||||||
mLError("user:%s login from %s, result:%s", connInfo.user, taosIpStr(connInfo.clientIp), tstrerror(code));
|
mLError("user:%s login from %s, result:%s", connInfo.user, taosIpStr(connInfo.clientIp), tstrerror(code));
|
||||||
} else {
|
} else {
|
||||||
mLInfo("user:%s login from %s, result:%s", connInfo.user, taosIpStr(connInfo.clientIp), tstrerror(code));
|
mLInfo("user:%s login from %s, result:%s", connInfo.user, taosIpStr(connInfo.clientIp), tstrerror(code));
|
||||||
|
|
Loading…
Reference in New Issue