Skip to content

Commit 01309a0

Browse files
committed
DPL: do not check for events unless we were notified
1 parent e439925 commit 01309a0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Framework/Core/src/DataProcessingDevice.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ void on_socket_polled(uv_poll_t* poller, int status, int events)
345345
case UV_READABLE: {
346346
O2_SIGNPOST_EVENT_EMIT(device, sid, "socket_state", "Data pending on socket for channel %{public}s", context->name);
347347
context->state->loopReason |= DeviceState::DATA_INCOMING;
348+
context->channelInfo->readPolled = true;
348349
} break;
349350
case UV_WRITABLE: {
350351
O2_SIGNPOST_END(device, sid, "socket_state", "Socket connected for channel %{public}s", context->name);
@@ -1672,6 +1673,10 @@ void DataProcessingDevice::doPrepare(ServiceRegistryRef ref)
16721673
channelSpec.name.c_str(), (int)info.state, info.parts.Size());
16731674
continue;
16741675
}
1676+
if (info.readPolled == false) {
1677+
O2_SIGNPOST_END(device, cid, "channels", "Channel %s which is in state %d did not request reading.", channelSpec.name.c_str(), (int)info.state);
1678+
continue;
1679+
}
16751680
auto& socket = info.channel->GetSocket();
16761681
// If we have pending events from a previous iteration,
16771682
// we do receive in any case.

0 commit comments

Comments
 (0)