Bugfix for the exception handling change.

This commit is contained in:
Gunnar Beutner 2012-04-30 12:50:11 +02:00
parent 7e4788720d
commit f497c5e932
1 changed files with 7 additions and 6 deletions

View File

@ -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();