#5150 - Code style fix and connect timeout docs update
Signed-off-by: Oleg Mozzhechkov <oleg.mozzhechkov@gmail.com>
This commit is contained in:
parent
bffd6a2c0f
commit
32fe19a5e0
|
@ -690,7 +690,7 @@ public class HttpClient extends ContainerLifeCycle
|
|||
}
|
||||
|
||||
/**
|
||||
* @return the max time, in milliseconds, a connection can take to connect to destinations
|
||||
* @return the max time, in milliseconds, a connection can take to connect to destinations. Zero value means infinite timeout.
|
||||
*/
|
||||
@ManagedAttribute("The timeout, in milliseconds, for connect() operations")
|
||||
public long getConnectTimeout()
|
||||
|
@ -699,7 +699,7 @@ public class HttpClient extends ContainerLifeCycle
|
|||
}
|
||||
|
||||
/**
|
||||
* @param connectTimeout the max time, in milliseconds, a connection can take to connect to destinations
|
||||
* @param connectTimeout the max time, in milliseconds, a connection can take to connect to destinations. Zero value means infinite timeout.
|
||||
* @see java.net.Socket#connect(SocketAddress, int)
|
||||
*/
|
||||
public void setConnectTimeout(long connectTimeout)
|
||||
|
|
|
@ -888,7 +888,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
{
|
||||
this.channel = channel;
|
||||
this.attachment = attachment;
|
||||
final long timeout = ManagedSelector.this._selectorManager.getConnectTimeout();
|
||||
long timeout = ManagedSelector.this._selectorManager.getConnectTimeout();
|
||||
if (timeout > 0)
|
||||
this.timeout = ManagedSelector.this._selectorManager.getScheduler().schedule(this, timeout, TimeUnit.MILLISECONDS);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue