Issue #2009: Fix NullPointerException in SocketServer start up.

Change-Id: I07683ba74410234d162e058df0bb3ff6e00ee59e

Former-commit-id: e10c907d60 [formerly a42de38d9e] [formerly f4b6c5929c] [formerly e10c907d60 [formerly a42de38d9e] [formerly f4b6c5929c] [formerly a711fea3d9 [formerly f4b6c5929c [formerly b2b6220d5b5ef2235edb57fe2ab2ce0cb234ee25]]]]
Former-commit-id: a711fea3d9
Former-commit-id: 1ce2c2fcf4 [formerly bf2e332633] [formerly 3f2862d88613bb9801408b75f01fb41f8da27c96 [formerly 9fbbeff998]]
Former-commit-id: 2cc53bf06ea4692b94334c1273204f28d694b55b [formerly a6fd072a4e]
Former-commit-id: 1474d8791c
This commit is contained in:
David Gillingham 2013-07-23 13:44:46 -05:00
parent e30cf91b22
commit 250f0b4a75

View file

@ -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.
*
* </pre>
*
@ -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()) {