You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by ld...@apache.org on 2024/11/05 10:48:40 UTC
(plc4x) branch develop updated: fix(plc4j/drivers/s7): fix NPE in S7HMuxImpl
This is an automated email from the ASF dual-hosted git repository.
ldywicki pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 3e089e424e fix(plc4j/drivers/s7): fix NPE in S7HMuxImpl
3e089e424e is described below
commit 3e089e424e8cda9f640b7c17a891b1fe3a7d831b
Author: jmeierhofer <46...@users.noreply.github.com>
AuthorDate: Tue Nov 5 11:48:35 2024 +0100
fix(plc4j/drivers/s7): fix NPE in S7HMuxImpl
This issue occurs when ie. Camel route can not establish connection immediately during start (#1866)
Co-authored-by: Jochen Meierhofer <jo...@systemlogistics.de>
---
.../java/org/apache/plc4x/java/s7/readwrite/protocol/S7HMuxImpl.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7HMuxImpl.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7HMuxImpl.java
index 1a987940d0..d58b8e32c4 100644
--- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7HMuxImpl.java
+++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7HMuxImpl.java
@@ -235,7 +235,8 @@ public class S7HMuxImpl extends MessageToMessageCodec<ByteBuf, ByteBuf> implemen
embededChannel.pipeline().fireUserEventTriggered(new DisconnectedEvent());
}
- logger.info(embedCtx.executor().toString());
+ if (embedCtx != null)
+ logger.info(embedCtx.executor().toString());
if ((tcpChannel == primaryChannel) &&
(primaryChannel == ctx.channel()))