[
https://issues.apache.org/jira/browse/SSHD-722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Goldstein Lyor resolved SSHD-722.
---------------------------------
Resolution: Not A Problem
Please re-open if there is an exception or error that you can indicate.
> 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
(v6.3.4#6332)