diff --git a/src/main/java/app/attestation/server/AttestationServer.java b/src/main/java/app/attestation/server/AttestationServer.java index eaca1344..85b9a48d 100644 --- a/src/main/java/app/attestation/server/AttestationServer.java +++ b/src/main/java/app/attestation/server/AttestationServer.java @@ -477,9 +477,6 @@ INSERT INTO Attestations ( attestationConn.dispose(); } - new Thread(new AlertDispatcher()).start(); - new Thread(new Maintenance()).start(); - final ThreadPoolExecutor executor = new ThreadPoolExecutor(32, 32, 0, TimeUnit.SECONDS, new LinkedBlockingQueue(1024)); executor.prestartAllCoreThreads(); @@ -503,6 +500,9 @@ INSERT INTO Attestations ( server.createContext("/submit", new SubmitHandler()); server.setExecutor(executor); server.start(); + + new Thread(new AlertDispatcher()).start(); + new Thread(new Maintenance()).start(); } private static String getRequestHeaderValue(final HttpExchange exchange, final String header)