Issue #207 - Using connection idle-timeout declared in annotation
This commit is contained in:
parent
0e9841a3cc
commit
512e0ec076
|
@ -177,6 +177,8 @@ public class WebSocketSession extends ContainerLifeCycle implements Session, Rem
|
|||
addManaged(this.endpointFunctions);
|
||||
|
||||
super.doStart();
|
||||
|
||||
connection.setMaxIdleTimeout(this.policy.getIdleTimeout());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -729,9 +729,12 @@ public abstract class AbstractWebSocketConnection extends AbstractConnection imp
|
|||
|
||||
@Override
|
||||
public void setMaxIdleTimeout(long ms)
|
||||
{
|
||||
if(ms >= 0)
|
||||
{
|
||||
getEndPoint().setIdleTimeout(ms);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuspendToken suspend()
|
||||
|
|
|
@ -88,7 +88,8 @@ public class IdleTimeoutTest
|
|||
client.expectUpgradeResponse();
|
||||
|
||||
// This wait should be shorter than client timeout above, but
|
||||
// longer than server timeout configured in TimeoutServlet
|
||||
// longer than server timeout configured in FastTimeoutRFCSocket
|
||||
// eg: websocket server endpoint timeout < this timeout < websocket client idle timeout
|
||||
client.sleep(TimeUnit.MILLISECONDS,1000);
|
||||
|
||||
// Write to server
|
||||
|
|
Loading…
Reference in New Issue