diff --git a/jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java b/jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java index b8ea3b458bf..b4cccb92977 100644 --- a/jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java +++ b/jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java @@ -290,13 +290,8 @@ public class WebSocketClient extends ContainerLifeCycle 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) { throw new IllegalStateException("Connect Timeout cannot be negative"); @@ -318,4 +313,4 @@ public class WebSocketClient extends ContainerLifeCycle { this.masker = masker; } -} \ No newline at end of file +}