revert ConfigurationCustomizer change from #3374

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2019-05-10 14:21:22 +10:00 committed by Greg Wilkins
parent 9eea85e68e
commit 2782344d4c
2 changed files with 7 additions and 4 deletions

View File

@ -533,25 +533,25 @@ public interface FrameHandler extends IncomingFrames
@Override @Override
public Duration getIdleTimeout() public Duration getIdleTimeout()
{ {
return idleTimeout; return idleTimeout==null ? WebSocketConstants.DEFAULT_IDLE_TIMEOUT : idleTimeout;
} }
@Override @Override
public Duration getWriteTimeout() public Duration getWriteTimeout()
{ {
return writeTimeout; return writeTimeout==null ? WebSocketConstants.DEFAULT_WRITE_TIMEOUT : writeTimeout;
} }
@Override @Override
public void setIdleTimeout(Duration timeout) public void setIdleTimeout(Duration timeout)
{ {
this.idleTimeout = timeout==null ? Duration.ZERO : timeout; this.idleTimeout = timeout;
} }
@Override @Override
public void setWriteTimeout(Duration timeout) public void setWriteTimeout(Duration timeout)
{ {
this.writeTimeout = timeout==null ? Duration.ZERO : timeout; this.writeTimeout = timeout;
} }
@Override @Override

View File

@ -19,6 +19,7 @@
package org.eclipse.jetty.websocket.core; package org.eclipse.jetty.websocket.core;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.time.Duration;
public final class WebSocketConstants public final class WebSocketConstants
{ {
@ -32,6 +33,8 @@ public final class WebSocketConstants
public static final int DEFAULT_INPUT_BUFFER_SIZE = 4 * 1024; public static final int DEFAULT_INPUT_BUFFER_SIZE = 4 * 1024;
public static final int DEFAULT_OUTPUT_BUFFER_SIZE = 4 * 1024; public static final int DEFAULT_OUTPUT_BUFFER_SIZE = 4 * 1024;
public static final boolean DEFAULT_AUTO_FRAGMENT = true; public static final boolean DEFAULT_AUTO_FRAGMENT = true;
public static final Duration DEFAULT_IDLE_TIMEOUT = Duration.ZERO;
public static final Duration DEFAULT_WRITE_TIMEOUT = Duration.ZERO;
/** /**
* Globally Unique Identifier for use in WebSocket handshake within {@code Sec-WebSocket-Accept} and <code>Sec-WebSocket-Key</code> http headers. * Globally Unique Identifier for use in WebSocket handshake within {@code Sec-WebSocket-Accept} and <code>Sec-WebSocket-Key</code> http headers.