diff --git a/MHSEmulator/src/mhs/core/SocketSrv.java b/MHSEmulator/src/mhs/core/SocketSrv.java index 66b43ea1f3..356f589df5 100644 --- a/MHSEmulator/src/mhs/core/SocketSrv.java +++ b/MHSEmulator/src/mhs/core/SocketSrv.java @@ -40,7 +40,8 @@ import java.util.regex.Pattern; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * ??? ?? ???? bphillip Initial creation - * Jul 15, 2013 #2099 dgilling Code cleanup. + * Jul 15, 2013 #2009 dgilling Code cleanup. + * Jul 23, 2013 #2009 dgilling Fix NullPointerException on start up. * * * @@ -146,8 +147,11 @@ public class SocketSrv { } public void run() throws IOException { - Runnable rsyncJob = new RsyncThread(serverProps); - rsyncThread.scheduleWithFixedDelay(rsyncJob, 1, 1, TimeUnit.SECONDS); + if (rsyncThread != null) { + Runnable rsyncJob = new RsyncThread(serverProps); + rsyncThread + .scheduleWithFixedDelay(rsyncJob, 1, 1, TimeUnit.SECONDS); + } ServerSocket socket = new ServerSocket(serverPort); while (!mhsRequestHandler.isShutdown()) {