This commit is contained in:
wentch
2015-12-30 17:08:29 +08:00
parent 14a6a4168a
commit 0045b22bc0

View File

@@ -47,7 +47,7 @@ public final class WebSocketEngine {
void init(AnyValue conf) { void init(AnyValue conf) {
final int liveinterval = conf == null ? DEFAILT_LIVEINTERVAL : conf.getIntValue("liveinterval", DEFAILT_LIVEINTERVAL); final int liveinterval = conf == null ? DEFAILT_LIVEINTERVAL : conf.getIntValue("liveinterval", DEFAILT_LIVEINTERVAL);
if (liveinterval == 0) return; if (liveinterval <= 0) return;
if (scheduler != null) return; if (scheduler != null) return;
this.scheduler = new ScheduledThreadPoolExecutor(1, (Runnable r) -> { this.scheduler = new ScheduledThreadPoolExecutor(1, (Runnable r) -> {
final Thread t = new Thread(r, engineid + "-WebSocket-LiveInterval-Thread"); final Thread t = new Thread(r, engineid + "-WebSocket-LiveInterval-Thread");