From dc6fb4698c95a58d6de8d0cfac447761556927df Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Tue, 8 Sep 2015 14:34:05 +0200 Subject: [PATCH] Fix bug in nanomsg implementation of poller check. --- fairmq/examples/5-req-rep/FairMQExample5Server.cxx | 2 -- fairmq/nanomsg/FairMQPollerNN.cxx | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/fairmq/examples/5-req-rep/FairMQExample5Server.cxx b/fairmq/examples/5-req-rep/FairMQExample5Server.cxx index 9f47c75f..e1c600f4 100644 --- a/fairmq/examples/5-req-rep/FairMQExample5Server.cxx +++ b/fairmq/examples/5-req-rep/FairMQExample5Server.cxx @@ -33,8 +33,6 @@ void FairMQExample5Server::Run() { while (CheckCurrentState(RUNNING)) { - boost::this_thread::sleep(boost::posix_time::milliseconds(1000)); - unique_ptr request(fTransportFactory->CreateMessage()); if (fChannels.at("data").at(0).Receive(request) > 0) diff --git a/fairmq/nanomsg/FairMQPollerNN.cxx b/fairmq/nanomsg/FairMQPollerNN.cxx index f86870df..8bfe65eb 100644 --- a/fairmq/nanomsg/FairMQPollerNN.cxx +++ b/fairmq/nanomsg/FairMQPollerNN.cxx @@ -130,7 +130,7 @@ void FairMQPollerNN::Poll(int timeout) bool FairMQPollerNN::CheckInput(const int index) { - if (items[index].revents & NN_POLLIN) + if (items[index].revents & (NN_POLLIN | NN_POLLOUT)) { return true; }