You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Luchnikov Alexander (Jira)" <ji...@apache.org> on 2022/05/13 09:03:00 UTC
[jira] [Updated] (IGNITE-15867) Socket shutdown called twice in GridNioServer
[ https://issues.apache.org/jira/browse/IGNITE-15867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luchnikov Alexander updated IGNITE-15867:
-----------------------------------------
Labels: ise.lts (was: )
> Socket shutdown called twice in GridNioServer
> ---------------------------------------------
>
> Key: IGNITE-15867
> URL: https://issues.apache.org/jira/browse/IGNITE-15867
> Project: Ignite
> Issue Type: Bug
> Components: networking
> Affects Versions: 2.11
> Reporter: Ilya Korol
> Assignee: Roman Puchkovskiy
> Priority: Major
> Labels: ise.lts
> Fix For: 2.13
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 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.7#820007)