Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Made AbstractNettyIoClient disconnect async (previously was sync and caused dead lock with websocket protocol)

Rich Turnere9ad32ea00ed
diff --git a/agent/src/main/java/org/openremote/agent/protocol/io/AbstractNettyIoClient.java b/agent/src/main/java/org/openremote/agent/protocol/io/AbstractNettyIoClient.java
index 03fefd071..0cfefab90 100644
--- a/agent/src/main/java/org/openremote/agent/protocol/io/AbstractNettyIoClient.java
+++ b/agent/src/main/java/org/openremote/agent/protocol/io/AbstractNettyIoClient.java
@@ -210,18 +210,16 @@ public abstract class AbstractNettyIoClient<T, U extends SocketAddress> implemen
if (channelFuture != null) {
channelFuture.cancel(true);
- channelFuture.sync();
channelFuture = null;
}
// Close the channel
if (channel != null) {
- channel.close().sync();
+ channel.disconnect();
+ channel.close();
channel = null;
}
- } catch (InterruptedException ignored) {
-
} finally {
if (workerGroup != null) {
workerGroup.shutdownGracefully();