mirror of https://github.com/Icinga/icinga2.git
Bugfix for the exception handling change.
This commit is contained in:
parent
7e4788720d
commit
f497c5e932
|
@ -23,12 +23,13 @@ int JsonRpcClient::DataAvailableHandler(const EventArgs& ea)
|
|||
try {
|
||||
Message message;
|
||||
|
||||
if (Netstring::ReadMessageFromFIFO(GetRecvQueue(), &message)) {
|
||||
NewMessageEventArgs nea;
|
||||
nea.Source = shared_from_this();
|
||||
nea.Message = message;
|
||||
OnNewMessage(nea);
|
||||
}
|
||||
if (!Netstring::ReadMessageFromFIFO(GetRecvQueue(), &message))
|
||||
break;
|
||||
|
||||
NewMessageEventArgs nea;
|
||||
nea.Source = shared_from_this();
|
||||
nea.Message = message;
|
||||
OnNewMessage(nea);
|
||||
} catch (const Exception& ex) {
|
||||
Application::Log("Exception while processing message from JSON-RPC client: " + ex.GetMessage());
|
||||
Close();
|
||||
|
|
Loading…
Reference in New Issue