[ https://issues.apache.org/jira/browse/IGNITE-15867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roman Puchkovskiy reassigned IGNITE-15867: ------------------------------------------ Assignee: Roman Puchkovskiy > Socket shutdown called twice in GridNioServer > --------------------------------------------- > > Key: IGNITE-15867 > URL: https://issues.apache.org/jira/browse/IGNITE-15867 > Project: Ignite > Issue Type: Bug > Components: general > Affects Versions: 2.11 > Reporter: Ilya Korol > Assignee: Roman Puchkovskiy > Priority: Major > > After fixing IGNITE-15367 calling > {{GridNioServer$AbstractNioClientWorker.closekey(SelectionKey key)}} would > produce excessive {{java.nio.channels.ClosedChannelException}} because > {{sock.shutdownInput()}} and {{sock.shutdownInput()}} would be called twice: > {code:java} > // GridNioServer$AbstractNioClientWorker > private void closeKey(SelectionKey key) { > // Shutdown input and output so that remote client will see correct > socket close. > Socket sock = ((SocketChannel)key.channel()).socket(); > try { > try { > sock.shutdownInput(); // <-- First time > } > catch (IOException ignored) { > // No-op. > } > try { > sock.shutdownOutput(); // <-- First time > } > catch (IOException ignored) { > // No-op. > } > } > finally { > U.close(key, log); // <-- Second time > U.close(sock, log); // <-- Second time > } > } > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001)