connection is cache has already been released because of the broken link

This commit is contained in:
Jeff Tao 2020-04-02 08:28:15 +08:00
parent f8a6ca0a88
commit f091d8f5e6
1 changed files with 1 additions and 1 deletions

View File

@ -658,7 +658,7 @@ static SRpcConn *rpcSetupConnToServer(SRpcReqContext *pContext) {
SRpcIpSet *pIpSet = &pContext->ipSet;
pConn = rpcGetConnFromCache(pRpc->pCache, pIpSet->ip[pIpSet->inUse], pIpSet->port, pContext->connType);
if ( pConn == NULL ) {
if ( pConn == NULL || pConn->user[0] == 0) {
char ipstr[20] = {0};
tinet_ntoa(ipstr, pIpSet->ip[pIpSet->inUse]);
pConn = rpcOpenConn(pRpc, ipstr, pIpSet->port, pContext->connType);