Merge pull request #2101 from taosdata/hotfix/rpcMaxTime
Hotfix/rpc max time
This commit is contained in:
commit
56a57dfa8a
|
@ -683,6 +683,7 @@ static SRpcConn *rpcSetupConnToServer(SRpcReqContext *pContext) {
|
|||
pConn->tretry = 0;
|
||||
pConn->ahandle = pContext->ahandle;
|
||||
sprintf(pConn->info, "%s %p %p", pRpc->label, pConn, pConn->ahandle);
|
||||
pConn->tretry = 0;
|
||||
} else {
|
||||
tError("%s %p, failed to set up connection(%s)", pRpc->label, pContext->ahandle, tstrerror(terrno));
|
||||
}
|
||||
|
@ -833,8 +834,8 @@ static SRpcConn *rpcProcessMsgHead(SRpcInfo *pRpc, SRecvInfo *pRecv) {
|
|||
terrno = rpcProcessReqHead(pConn, pHead);
|
||||
pConn->connType = pRecv->connType;
|
||||
|
||||
// client shall send the request within tsRpcTime again, put 20 mseconds tolerance
|
||||
taosTmrReset(rpcProcessIdleTimer, tsRpcTimer+20, pConn, pRpc->tmrCtrl, &pConn->pIdleTimer);
|
||||
// client shall send the request within tsRpcTime again, double it
|
||||
taosTmrReset(rpcProcessIdleTimer, tsRpcTimer*2, pConn, pRpc->tmrCtrl, &pConn->pIdleTimer);
|
||||
} else {
|
||||
terrno = rpcProcessRspHead(pConn, pHead);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ int retrieveAuthInfo(char *meterId, char *spi, char *encrypt, char *secret, char
|
|||
|
||||
void processRequestMsg(SRpcMsg *pMsg, SRpcIpSet *pIpSet) {
|
||||
SRpcMsg *pTemp;
|
||||
|
||||
|
||||
pTemp = taosAllocateQitem(sizeof(SRpcMsg));
|
||||
memcpy(pTemp, pMsg, sizeof(SRpcMsg));
|
||||
|
||||
|
@ -171,7 +171,6 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
tsAsyncLog = 0;
|
||||
rpcInit.connType = TAOS_CONN_SERVER;
|
||||
|
||||
taosInitLog("server.log", 100000, 10);
|
||||
|
||||
void *pRpc = rpcOpen(&rpcInit);
|
||||
|
|
Loading…
Reference in New Issue