Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 97717 invoked from network); 31 Mar 2010 18:05:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 31 Mar 2010 18:05:49 -0000 Received: (qmail 20063 invoked by uid 500); 31 Mar 2010 18:05:48 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 19975 invoked by uid 500); 31 Mar 2010 18:05:48 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 19781 invoked by uid 99); 31 Mar 2010 18:05:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Mar 2010 18:05:48 +0000 X-ASF-Spam-Status: No, hits=-1185.6 required=10.0 tests=ALL_TRUSTED,AWL 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; Wed, 31 Mar 2010 18:05:47 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7348E234C4C8 for ; Wed, 31 Mar 2010 18:05:27 +0000 (UTC) Message-ID: <451276269.610471270058727471.JavaMail.jira@brutus.apache.org> Date: Wed, 31 Mar 2010 18:05:27 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (NET-307) One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly In-Reply-To: <956106366.174051263268014446.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NET-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb updated NET-307: --------------------- Fix Version/s: (was: 3.0) 2.0 > One of the "connect" method in class org.apache.commons.net.SocketClient doesn't handle connection timeout properly > ------------------------------------------------------------------------------------------------------------------- > > Key: NET-307 > URL: https://issues.apache.org/jira/browse/NET-307 > Project: Commons Net > Issue Type: Improvement > Affects Versions: 2.0 > Environment: Not applicable > Reporter: sg > Priority: Minor > Fix For: 2.0 > > > org.apache.commons.net.SocketClient method connect (line 225) doesn't use the configured timeout value. > Original code: > {code:title=SocketClient.java (line 225)|borderStyle=solid} > public void connect(String hostname, int port, > InetAddress localAddr, int localPort) > throws SocketException, IOException > { > _socket_ = _socketFactory_.createSocket(hostname, port, localAddr, localPort); > _connectAction_(); > } > {code} > Working alternative: > {code:title=SocketClient.java (line 225)|borderStyle=solid} > public void connect(String hostname, int port, > InetAddress localAddr, int localPort) > throws SocketException, IOException > { > _socket_ = _socketFactory_.createSocket(); > _socket_.bind(new InetSocketAddress(localAddr, localPort)); > _socket_.connect(new InetSocketAddress(hostname, port), connectTimeout); > _connectAction_(); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.