mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
2adfcb56fe
commit
a529725a92
@ -115,13 +115,18 @@ void ExternalCommandListener::CommandPipeThread(const String& commandPath)
|
||||
try {
|
||||
rc = sock->Read(buffer, sizeof(buffer));
|
||||
} catch (const std::exception& ex) {
|
||||
/* We have read all data. */
|
||||
if (errno == EAGAIN)
|
||||
continue;
|
||||
|
||||
Log(LogWarning, "ExternalCommandListener")
|
||||
<< "Cannot read from socket." << DiagnosticInformation(ex);
|
||||
<< "Cannot read from command pipe." << DiagnosticInformation(ex);
|
||||
break;
|
||||
}
|
||||
|
||||
if (rc <= 0)
|
||||
break;
|
||||
/* Empty pipe (EOF) */
|
||||
if (rc == 0)
|
||||
continue;
|
||||
|
||||
fifo->Write(buffer, rc);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user