You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rajith Attapattu (JIRA)" <ji...@apache.org> on 2013/04/24 00:39:15 UTC

[jira] [Commented] (QPID-4714) AMQConnection close is leaking socket connections

    [ https://issues.apache.org/jira/browse/QPID-4714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13639735#comment-13639735 ] 

Rajith Attapattu commented on QPID-4714:
----------------------------------------

If we move the close connection method inside a finally block, then we can ensure the TCP connection is closed, even if an exception is thrown.

{code}
+                    finally
+                    {
+                        try
+                        {
+                            _delegate.closeConnection(timeout);
+                        }
+                        catch (Exception e)
+                        {
+                            _logger.warn("Error closing underlying protocol connection", e);
+                        }
+                    }
{code}
                
> AMQConnection close is leaking socket connections
> -------------------------------------------------
>
>                 Key: QPID-4714
>                 URL: https://issues.apache.org/jira/browse/QPID-4714
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.20
>            Reporter: Rajith Attapattu
>             Fix For: Future
>
>
> If any of the operations throws an exception before the call to _delegate.closeConnection(timeout); then we will leak socket connections.
> I already see this happening when running performance tests, where session/connection close operations are timing out. The number of connections keeps growing.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org