You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (Resolved) (JIRA)" <ji...@apache.org> on 2012/02/19 20:38:41 UTC

[jira] [Resolved] (QPID-3854) SO_REUSEADDR should be applied to server socket before bind()

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

Robbie Gemmell resolved QPID-3854.
----------------------------------

    Resolution: Fixed

Looks good to me.
                
> SO_REUSEADDR should be applied to server socket before bind()
> -------------------------------------------------------------
>
>                 Key: QPID-3854
>                 URL: https://issues.apache.org/jira/browse/QPID-3854
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.12, 0.14, 0.15
>            Reporter: Keith Wall
>            Assignee: Robbie Gemmell
>             Fix For: 0.15
>
>
> In the IoNetworkTransport code, we currently apply the server socket option (SO_REUSEADDR) after the bind() call.  This ordering is contrary to the documentation at http://docs.oracle.com/javase/6/docs/api/java/net/ServerSocket.html#setReuseAddress(boolean) which states:
> bq. Enabling SO_REUSEADDR prior to binding the socket using bind(SocketAddress) allows the socket to be bound even though a previous connection is in a timeout state. When a ServerSocket is created the initial setting of SO_REUSEADDR is not defined. Applications can use getReuseAddress() to determine the initial setting of SO_REUSEADDR. The behaviour when SO_REUSEADDR is enabled or disabled after a socket is bound (See isBound()) is not defined.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org