From 01309a094082d150ce6ea2a6506019001cd9507c Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Wed, 7 May 2025 17:45:06 +0200 Subject: [PATCH] DPL: do not check for events unless we were notified --- Framework/Core/src/DataProcessingDevice.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Framework/Core/src/DataProcessingDevice.cxx b/Framework/Core/src/DataProcessingDevice.cxx index ae25d8d3a915c..52202df1b8ba7 100644 --- a/Framework/Core/src/DataProcessingDevice.cxx +++ b/Framework/Core/src/DataProcessingDevice.cxx @@ -345,6 +345,7 @@ void on_socket_polled(uv_poll_t* poller, int status, int events) case UV_READABLE: { O2_SIGNPOST_EVENT_EMIT(device, sid, "socket_state", "Data pending on socket for channel %{public}s", context->name); context->state->loopReason |= DeviceState::DATA_INCOMING; + context->channelInfo->readPolled = true; } break; case UV_WRITABLE: { O2_SIGNPOST_END(device, sid, "socket_state", "Socket connected for channel %{public}s", context->name); @@ -1672,6 +1673,10 @@ void DataProcessingDevice::doPrepare(ServiceRegistryRef ref) channelSpec.name.c_str(), (int)info.state, info.parts.Size()); continue; } + if (info.readPolled == false) { + O2_SIGNPOST_END(device, cid, "channels", "Channel %s which is in state %d did not request reading.", channelSpec.name.c_str(), (int)info.state); + continue; + } auto& socket = info.channel->GetSocket(); // If we have pending events from a previous iteration, // we do receive in any case.