diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index bdf19bb4a085159a9ee07ab7691b36dc64e257bc..55b6be195bde1c2ba46665d6aa2117bd32dfdee2 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -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); } diff --git a/src/rpc/test/rserver.c b/src/rpc/test/rserver.c index 508f04fbc349ec5485360e70992c6e35b1f8728c..f22fa35f52485a42b386fb4b59b8354aef882ce0 100644 --- a/src/rpc/test/rserver.c +++ b/src/rpc/test/rserver.c @@ -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);