From 067b01d35a17e8fc0dfde42a6e9a8158a632312b Mon Sep 17 00:00:00 2001 From: Alex Osborne Date: Fri, 30 Aug 2024 11:10:15 +0900 Subject: [PATCH] Set system property sun.net.httpserver.nodelay=true Makes responses faster. --- src/outbackcdx/Main.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/outbackcdx/Main.java b/src/outbackcdx/Main.java index 194ef36..d10cb99 100644 --- a/src/outbackcdx/Main.java +++ b/src/outbackcdx/Main.java @@ -190,6 +190,7 @@ public static void main(String[] args) { Main.class.wait(); } } else { + System.setProperty("sun.net.httpserver.nodelay", "true"); HttpServer httpServer = HttpServer.create(new InetSocketAddress((host == null ? "localhost" : host), port), 0); httpServer.createContext("/", new Web.SHandler(controller, authorizer)); ExecutorService threadPool = Executors.newFixedThreadPool(webThreads);