mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goldstein Lyor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-722) Failed to setting SO_KEEPALIVE option for sshd server socket
Date Sat, 10 Dec 2016 05:19:58 GMT

    [ https://issues.apache.org/jira/browse/SSHD-722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15737248#comment-15737248

Goldstein Lyor commented on SSHD-722:

 I see what you mean - will fix it.

> Failed to setting SO_KEEPALIVE option for sshd server socket
> ------------------------------------------------------------
>                 Key: SSHD-722
>                 URL: https://issues.apache.org/jira/browse/SSHD-722
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Li Fangning
>            Assignee: Goldstein Lyor
>            Priority: Minor
> Use the following code to set the SO_KEEPALIVE property:
>   PropertyResolverUtils.updateProperty(sshd, SshServer.SOCKET_KEEPALIVE, true)
> I get the error message: Unsupported socket option (SO_KEEPALIVE) to set ......
> After I check the code in org.apache.sshd.common.io.nio2.Nio2Acceptor#bind(), I found
that the SO_KEEPALIVE option is set on the AsynchronousServerSocketChannel, i.e. a listening
socket which can only accept new incoming connections and not exchange data. The socket option
is not applicable to a listening socket. (https://docs.oracle.com/javase/8/docs/api/java/nio/channels/AsynchronousServerSocketChannel.html)
> Whether this code can be changed to the org.apache.sshd.common.io.nio2.Nio2Acceptor$AcceptCompletionHandler#onCompleted(),
and set the options on the AsynchronousSocketChannel object?
> SO_SENDBUF, TCP_NODELAY options have the same issue.

This message was sent by Atlassian JIRA

View raw message