fix servantproxy may crash when ctrl+c

pull/276/head
ruanshudong 2023-05-24 11:26:25 +08:00
parent bdcef297e6
commit cc4e4afa4a
1 changed files with 5 additions and 0 deletions

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());
//循环使用下一个网络线程发送数据