Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 66077 invoked from network); 11 Apr 2008 14:58:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Apr 2008 14:58:45 -0000 Received: (qmail 65361 invoked by uid 500); 11 Apr 2008 14:58:36 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 65339 invoked by uid 500); 11 Apr 2008 14:58:36 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 65111 invoked by uid 99); 11 Apr 2008 14:58:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2008 07:58:35 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2008 14:58:01 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 93931234C0C5 for ; Fri, 11 Apr 2008 07:55:43 -0700 (PDT) Message-ID: <1326668016.1207925743603.JavaMail.jira@brutus> Date: Fri, 11 Apr 2008 07:55:43 -0700 (PDT) From: "Nathan Mittler (JIRA)" To: dev@activemq.apache.org Subject: [jira] Updated: (AMQCPP-168) Create a connection can block for up to 4 mins under Linux when TCP socket connect() times out In-Reply-To: <14132125.1203020495554.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQCPP-168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Mittler updated AMQCPP-168: ---------------------------------- Fix Version/s: 2.2 > Create a connection can block for up to 4 mins under Linux when TCP socket connect() times out > ---------------------------------------------------------------------------------------------- > > Key: AMQCPP-168 > URL: https://issues.apache.org/activemq/browse/AMQCPP-168 > Project: ActiveMQ C++ Client > Issue Type: Improvement > Components: CMS Impl > Affects Versions: 2.1.3 > Environment: CentOS 4 > Reporter: Olivier Langlois > Assignee: Nathan Mittler > Fix For: 2.2 > > Attachments: AMQCPP_168.patch > > Original Estimate: 4 hours > Remaining Estimate: 4 hours > > With the following code: > { > // Create a ConnectionFactory > std::auto_ptr pConnectionFactory( > cms::ConnectionFactory::createCMSConnectionFactory( uri ) ); > m_pConnection.reset(pConnectionFactory->createConnection()); > m_pConnection->start(); > } > The call to createConnection() will block for up to 4 mins if the URI is a TCP address pointing to an unreachable host. > In my application, the time out interval is way too long. I would like to have it set to around 5 sec to 10 seconds. > I could take care of the fix if you want as all that would be needed is make the socket non blocking only for the connect() call and manage the time out with a select(). The only indication I would need is how you ActiveMQ cms architects/designers would like the timeout specified to the API. > Using a new property (ie: "connect-timeout") > hardcoding a small timeout value in TcpSocket > etc... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.