src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java
private synchronized static void enableExecutorService() {
        if (periodicPingExecutorService == null) {
            periodicPingExecutorService = new ScheduledThreadPoolExecutor(1,
                    new ThreadFactory() {
                        @Override
                        public Thread newThread(Runnable runnable) {
                            Thread pingThread = new Thread(runnable,
                                    "Smack Keepalive");
                            pingThread.setDaemon(true);
                            return pingThread;
                        }
                    });
        }
    }
private synchronized static void enableExecutorService() {
        if (periodicPingExecutorService == null) {
            periodicPingExecutorService = new ScheduledThreadPoolExecutor(1,
                    new ThreadFactory() {
                        @Override
                        public Thread newThread(Runnable runnable) {
                            Thread pingThread = new Thread(runnable,
                                    "Smack Keepalive");
                            pingThread.setDaemon(true);
                            return pingThread;
                        }
                    });
        }
    }
private synchronized static void enableExecutorService ( ) { if ( periodicPingExecutorService == null ) { periodicPingExecutorService = new ScheduledThreadPoolExecutor ( 1 , new ThreadFactory ( ) { @ Override public Thread newThread ( Runnable runnable ) { Thread pingThread = new Thread ( runnable , "Smack Keepalive" ) ; pingThread . setDaemon ( true ) ; return pingThread ; } } ) ; } }
/*
Start the executor service if it hasn't been started yet.
/ * Start the executor service if it hasn t been started yet .