fix servantproxy may crash when ctrl+c

This commit is contained in:
ruanshudong 2023-05-24 11:26:25 +08:00
parent bdcef297e6
commit cc4e4afa4a

View File

@ -1560,6 +1560,11 @@ void ServantProxy::selectNetThreadInfo(ServantProxyThreadData *pSptd, ObjectProx
}
}
if(communicatorEpollInfo->_communicator->isTerminating())
{
throw TarsCommunicatorException("communicator may deconstruct");
}
assert(communicatorEpollInfo->_netSeq < _communicator->getCommunicatorEpollNum());
//循环使用下一个网络线程发送数据