Skip to content

Commit ab00649

Browse files
committed
stfbuilder: fix warnings on peer closing the channel
1 parent 5d4de32 commit ab00649

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/StfBuilder/StfBuilderInput.cxx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,22 @@ void StfInputInterface::DataHandlerThread()
9595

9696
// receive readout messages
9797
const auto lRet = lInputChan.Receive(lReadoutMsgs);
98-
if (lRet < 0 && mRunning) {
98+
if (lRet < 0 && !mAcceptingData) { // NOT in FMQ:running state
99+
continue;
100+
}
101+
102+
if (lRet >= 0 && !mAcceptingData) {
103+
WDDLOG_RL(1000, "READOUT INTERFACE: Receive data but we are not in FMQ:RUNNING state.");
104+
continue;
105+
}
106+
107+
if (lRet < 0 && mRunning && mAcceptingData) {
99108
WDDLOG_RL(1000, "READOUT INTERFACE: Receive failed . err={}", std::to_string(lRet));
100109
continue;
101110
}
102111

112+
assert (lRet >= 0 && mAcceptingData);
113+
103114
if (lReadoutMsgs.empty()) {
104115
// nothing received?
105116
continue;

0 commit comments

Comments
 (0)