From d5c541a6e850493a7872623f42fcbff98889c715 Mon Sep 17 00:00:00 2001 From: Guus der Kinderen Date: Tue, 17 Dec 2024 17:03:12 +0100 Subject: [PATCH] Remove redundant 'sync' when closing Netty connection To prevent a stream management issue described in OF-2808, two fixes were applied. One of them, invoking close listeners synchronously, is suspected to have undesirable side-effects. This commit removes that fix, which is expected to be redundant anyway. --- .../java/org/jivesoftware/openfire/nio/NettyConnection.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnection.java b/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnection.java index 35e31311c7..a6821f20b4 100644 --- a/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnection.java +++ b/xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnection.java @@ -237,8 +237,7 @@ public void close(@Nullable final StreamError error, final boolean networkInterr latch.countDown(); } }) - .addListener(e -> Log.trace("Finished closing connection.")) - .sync(); // TODO: OF-2811 Remove this blocking operation (which may have been made redundant by the fix for OF-2808 anyway). + .addListener(e -> Log.trace("Finished closing connection.")); } catch (Throwable t) { Log.error("Problem during connection close or cleanup", t); latch.countDown(); // Ensure we're not kept waiting! OF-2845