Skip to content

Commit 22487af

Browse files
committed
Close SocketChannel correctly in NIO mode
Fixes #284
1 parent c2e5deb commit 22487af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/rabbitmq/client/impl/nio/SocketChannelFrameHandlerState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void close() throws IOException {
220220
if(ssl) {
221221
SslEngineHelper.close(channel, sslEngine);
222222
}
223-
if(!channel.isOpen()) {
223+
if(channel.isOpen()) {
224224
channel.socket().setSoLinger(true, SOCKET_CLOSING_TIMEOUT);
225225
channel.close();
226226
}

0 commit comments

Comments
 (0)