Skip to content

Commit

Permalink
refactor http server
Browse files Browse the repository at this point in the history
Signed-off-by: neo <1100909+neowu@users.noreply.github.com>
  • Loading branch information
neowu committed Feb 5, 2024
1 parent a2a40bc commit a08fba9
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public void start(HTTPServerConfig config) {
.setServerOption(UndertowOptions.MAX_ENTITY_SIZE, config.maxEntitySize)
.setServerOption(UndertowOptions.RECORD_REQUEST_START_TIME, Boolean.TRUE);

Xnio xnio = Xnio.getInstance(Thread.currentThread().getContextClassLoader());
builder.setWorker(xnio.createWorkerBuilder()
builder.setWorker(Xnio.getInstance().createWorkerBuilder()
.setWorkerIoThreads(Math.max(Runtime.getRuntime().availableProcessors(), 2))
.setExternalExecutorService(handler.worker)
.build());
Expand Down

0 comments on commit a08fba9

Please sign in to comment.