refactor: 更换 web 容器为 jetty 之后 websocket 超时时间改成一天

This commit is contained in:
zhangdahai112 2022-07-04 16:53:38 +08:00 committed by zhangdahai112
parent 7189c302a8
commit 00fe1cc9ff
1 changed files with 2 additions and 2 deletions

View File

@ -17,8 +17,8 @@ public class WebSocketUtils {
if (session == null) {
return;
}
// 设置永不超时一直保持会话连接
session.setMaxIdleTimeout(-1);
// 替换了web容器后 jetty没有设置永久有效的参数这里暂时设置超时时间为一天
session.setMaxIdleTimeout(86400000l);
RemoteEndpoint.Async async = session.getAsyncRemote();
if (async == null) {
return;