[
https://issues.apache.org/activemq/browse/AMQCPP-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41306#action_41306
]
Timothy Bish commented on AMQCPP-168:
-------------------------------------
Any patch you submit will need to be done against trunk which uses APR for its
sockets via the decaf library. You are welcome to come up with a fix that fits
that structure and submit it for review.
> 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
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> With the following code:
> {
> // Create a ConnectionFactory
> std::auto_ptr<cms::ConnectionFactory> 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.