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 2026/02/14 16:28:07 UTC
(plc4x) 01/01: Trigger socket disconnect when handshake fails.
This is an automated email from the ASF dual-hosted git repository.
ldywicki pushed a commit to branch issue/2290
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 7cf45cad7fc97073050ba44148973e5388dc5f43
Author: Łukasz Dywicki <lu...@code-house.org>
AuthorDate: Sat Feb 14 20:27:36 2026 +0400
Trigger socket disconnect when handshake fails.
Fixes #2290.
Signed-off-by: Łukasz Dywicki <lu...@code-house.org>
---
.../java/org/apache/plc4x/java/opcua/protocol/OpcuaProtocolLogic.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/plc4j/drivers/opcua/src/main/java/org/apache/plc4x/java/opcua/protocol/OpcuaProtocolLogic.java b/plc4j/drivers/opcua/src/main/java/org/apache/plc4x/java/opcua/protocol/OpcuaProtocolLogic.java
index 41d8c94cd7..116941ddb1 100644
--- a/plc4j/drivers/opcua/src/main/java/org/apache/plc4x/java/opcua/protocol/OpcuaProtocolLogic.java
+++ b/plc4j/drivers/opcua/src/main/java/org/apache/plc4x/java/opcua/protocol/OpcuaProtocolLogic.java
@@ -159,6 +159,7 @@ public class OpcuaProtocolLogic extends Plc4xProtocolBase<OpcuaAPU> implements H
future.whenComplete((response, error) -> {
if (error != null) {
LOGGER.error("Failed to establish connection", error);
+ context.fireDisconnected();
return;
}
LOGGER.info("Established connection to server");