Commit 162b7812 authored by Pavel Vainerman's avatar Pavel Vainerman

(LogReader): добавил проверку на наличие соединения (защита от SEGFAULT)

parent a7a1b440
...@@ -345,6 +345,12 @@ void LogReader::logOnEvent( const std::string& s ) ...@@ -345,6 +345,12 @@ void LogReader::logOnEvent( const std::string& s )
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
void LogReader::sendCommand(LogServerTypes::lsMessage& msg, bool verbose ) void LogReader::sendCommand(LogServerTypes::lsMessage& msg, bool verbose )
{ {
if( !tcp )
{
cerr << "(LogReader::sendCommand): tcp=NULL! no connection?!" << endl;
return;
}
try try
{ {
if( tcp->isPending(ost::Socket::pendingOutput, outTimeout) ) if( tcp->isPending(ost::Socket::pendingOutput, outTimeout) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment