DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23746>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23746

SocketClient.setDefaultTimeout has no effect

           Summary: SocketClient.setDefaultTimeout has no effect
           Product: Commons
           Version: Nightly Builds
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Net
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The API state 

> Set the default timeout in milliseconds to use when opening a socket. 
> This value is only used previous to a call to connect() and should not 
> be confused with setSoTimeout() which operates on an the currently opened
> socket. _timeout_ contains the new timeout value

but the code doese something else.

Maybe the declaration comment of _timout_ misled the implementor...

  /** The timeout to use after opening a socket. */
  protected int _timeout_;

When connecting, _timeout_ is used for setting soTimout, wich is wrong
 
  protected void _connectAction_() throws IOException {
    _socket_.setSoTimeout(_timeout_);
    _input_ = _socket_.getInputStream();
    _output_ = _socket_.getOutputStream();
    _isConnected_ = true;
  }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to