Skip to content

Commit

Permalink
Set system property sun.net.httpserver.nodelay=true
Browse files Browse the repository at this point in the history
Makes responses faster.
  • Loading branch information
ato committed Aug 30, 2024
1 parent 6480a3e commit 067b01d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/outbackcdx/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 067b01d

Please sign in to comment.