diff --git a/src/TNetwork.cpp b/src/TNetwork.cpp index 7c47bae..031cdae 100644 --- a/src/TNetwork.cpp +++ b/src/TNetwork.cpp @@ -496,7 +496,12 @@ void TNetwork::TCPClient(const std::weak_ptr& c) { debug("client status < 0, breaking client loop"); break; } - TServer::GlobalParser(c, TCPRcv(*Client), mPPSMonitor, *this); + auto res = TCPRcv(*Client); + if (res == "") { + debug("TCPRcv error, break client loop"); + break; + } + TServer::GlobalParser(c, res, mPPSMonitor, *this); } if (!c.expired()) { auto Client = c.lock();