From 6aabbf6024ab3c9d3fc4562a3dea0b79e73b8142 Mon Sep 17 00:00:00 2001 From: Ruslan Kashapov Date: Mon, 2 Oct 2023 13:41:53 +0300 Subject: [PATCH] Fix NetconfMessage not sent on EmbeddedChannel The EmbeddedChannel implementation uses built-in implementation for event loop (EmbeddedEventLoop) which has no own executor. The tasks placed via execute() method are queued but not executed unless predefined events like channel closure. Explicit triggering of pending tasks processing resolves the issue for now, but this needs to be revisited. JIRA: NETCONF-1106 Change-Id: Ief1d9566651c39e10310c961e5899324e73fa923 Signed-off-by: Ruslan Kashapov Signed-off-by: Robert Varga --- .../netconf/nettyutil/AbstractNetconfSession.java | 9 +++++++++ .../opendaylight/netconf/server/NetconfSubsystem.java | 1 + 2 files changed, 10 insertions(+) diff --git a/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSession.java b/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSession.java index 7f1009613a..3eaf83156f 100644 --- a/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSession.java +++ b/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSession.java @@ -15,6 +15,7 @@ import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPromise; import io.netty.channel.SimpleChannelInboundHandler; +import io.netty.channel.embedded.EmbeddedChannel; import io.netty.handler.codec.ByteToMessageDecoder; import io.netty.handler.codec.MessageToByteEncoder; import java.io.EOFException; @@ -92,6 +93,14 @@ public abstract class AbstractNetconfSession