mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Check return values of Receive calls in the examples
This commit is contained in:
committed by
Mohammad Al-Turany
parent
6dc4dc84b3
commit
4be6ba6e66
@@ -49,10 +49,11 @@ void FairMQExample5Client::Run()
|
||||
|
||||
if (fChannels.at("data").at(0).Send(request) > 0)
|
||||
{
|
||||
fChannels.at("data").at(0).Receive(reply);
|
||||
LOG(INFO) << "Received reply from server: \"" << string(static_cast<char*>(reply->GetData()), reply->GetSize()) << "\"";
|
||||
if (fChannels.at("data").at(0).Receive(reply) >= 0)
|
||||
{
|
||||
LOG(INFO) << "Received reply from server: \"" << string(static_cast<char*>(reply->GetData()), reply->GetSize()) << "\"";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user