Updated signature of setConnectTimeout(int) to setConnectTimeout(long)

to comply with field type and getter type.
Removed check that was throwing an exception if connect timeout was set
after start.
This commit is contained in:
Simone Bordet 2013-01-18 10:35:00 +01:00
parent 0c3ff5be4a
commit 1ca0f004c3
1 changed files with 2 additions and 7 deletions

View File

@ -290,13 +290,8 @@ public class WebSocketClient extends ContainerLifeCycle
this.bufferPool = bufferPool; this.bufferPool = bufferPool;
} }
public void setConnectTimeout(int connectTimeout) public void setConnectTimeout(long connectTimeout)
{ {
if (isStarted())
{
throw new IllegalStateException("Cannot change connect timeout, WebSocketClient is already started");
}
if (connectTimeout < 0) if (connectTimeout < 0)
{ {
throw new IllegalStateException("Connect Timeout cannot be negative"); throw new IllegalStateException("Connect Timeout cannot be negative");