This commit is contained in:
Redkale
2017-05-13 18:54:39 +08:00
parent ab2656cde6
commit 4f7145319f
2 changed files with 5 additions and 5 deletions

View File

@@ -62,6 +62,10 @@ public final class WebSocketEngine {
if (finest) logger.finest(this.getClass().getSimpleName() + "(" + engineid + ")" + " start keeplive(delay:" + delay + ", interval:" + liveinterval + "s) scheduler executor"); if (finest) logger.finest(this.getClass().getSimpleName() + "(" + engineid + ")" + " start keeplive(delay:" + delay + ", interval:" + liveinterval + "s) scheduler executor");
} }
void destroy(AnyValue conf) {
if (scheduler != null) scheduler.shutdownNow();
}
void add(WebSocket socket) { void add(WebSocket socket) {
WebSocketGroup group = containers.get(socket._groupid); WebSocketGroup group = containers.get(socket._groupid);
if (group == null) { if (group == null) {
@@ -93,10 +97,6 @@ public final class WebSocketEngine {
return containers.get(groupid); return containers.get(groupid);
} }
void close() {
if (scheduler != null) scheduler.shutdownNow();
}
public String getEngineid() { public String getEngineid() {
return engineid; return engineid;
} }

View File

@@ -89,7 +89,7 @@ public abstract class WebSocketServlet extends HttpServlet implements Resourcabl
final void postDestroy(HttpContext context, AnyValue conf) { final void postDestroy(HttpContext context, AnyValue conf) {
this.node.postDestroy(conf); this.node.postDestroy(conf);
super.destroy(context, conf); super.destroy(context, conf);
engine.close(); this.engine.destroy(conf);
} }
@Override @Override