diff --git a/fairmq/FairMQChannel.cxx b/fairmq/FairMQChannel.cxx index ed3ac343..7c963705 100644 --- a/fairmq/FairMQChannel.cxx +++ b/fairmq/FairMQChannel.cxx @@ -551,7 +551,10 @@ bool FairMQChannel::ExpectsAnotherPart() const inline bool FairMQChannel::HandleUnblock() const { FairMQMessage* cmd = fTransportFactory->CreateMessage(); - fCmdSocket->Receive(cmd, 0); + if (fCmdSocket->Receive(cmd, 0) >= 0) + { + LOG(DEBUG) << "unblocked"; + } delete cmd; return true; } diff --git a/fairmq/FairMQDevice.cxx b/fairmq/FairMQDevice.cxx index 81389404..ede6f276 100644 --- a/fairmq/FairMQDevice.cxx +++ b/fairmq/FairMQDevice.cxx @@ -79,8 +79,8 @@ void FairMQDevice::SignalHandler(int signal) MQLOG(INFO) << "Exiting."; stop(); - std::abort(); - // exit(EXIT_FAILURE); + // std::abort(); + exit(EXIT_FAILURE); } void FairMQDevice::InitWrapper() @@ -573,10 +573,10 @@ void FairMQDevice::InteractiveStateLoop() LOG(INFO) << "[h] help"; PrintInteractiveStateLoopHelp(); break; - case 'x': - LOG(INFO) << "[x] ERROR"; - ChangeState("ERROR_FOUND"); - break; + // case 'x': + // LOG(INFO) << "[x] ERROR"; + // ChangeState("ERROR_FOUND"); + // break; case 'q': LOG(INFO) << "[q] end"; ChangeState("END"); diff --git a/fairmq/devices/GenericFileSink.tpl b/fairmq/devices/GenericFileSink.tpl deleted file mode 100644 index 091ee987..00000000 --- a/fairmq/devices/GenericFileSink.tpl +++ /dev/null @@ -1,62 +0,0 @@ -/* - * File: GenericFileSink.tpl - * Author: winckler - * - * Created on October 7, 2014, 7:21 PM - */ - -template -GenericFileSink::GenericFileSink() - : InputPolicy() - , OutputPolicy() -{ -} - -template -GenericFileSink::~GenericFileSink() -{ -} - -template -void GenericFileSink::SetTransport(FairMQTransportFactory* transport) -{ - FairMQDevice::SetTransport(transport); - // InputPolicy::SetTransport(transport); -} - - -template -void GenericFileSink::InitTask() -{ - InitOutputFile(); - // InputPolicy::Init(); - // OutputPolicy::Init(); -} - -template -void GenericFileSink::InitOutputFile() -{ - OutputPolicy::InitOutFile(); -} - -template -void GenericFileSink::Run() -{ - int receivedMsg = 0; - - // store the channel reference to avoid traversing the map on every loop iteration - const FairMQChannel& inputChannel = fChannels["data-in"].at(0); - - while (CheckCurrentState(RUNNING)) - { - std::unique_ptr msg(fTransportFactory->CreateMessage()); - - if (inputChannel.Receive(msg) > 0) - { - OutputPolicy::AddToFile(InputPolicy::DeSerializeMsg(msg.get())); - receivedMsg++; - } - } - - MQLOG(INFO) << "Received " << receivedMsg << " messages!"; -}