[ 
https://issues.apache.org/jira/browse/IGNITE-15867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Amelchev Nikita updated IGNITE-15867:
-------------------------------------
    Release Note: Fixed logging non-informative ClosedChannelException  (was: 
Suppressed non-informative ClosedChannelException which was logged in some 
cases)

> 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
>             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.1#820001)

Reply via email to