Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.1.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
OlgaMaciaszek committed Sep 25, 2024
2 parents c32521a + 715fb9f commit 10d2e30
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,10 +35,10 @@

/**
* @author Spencer Gibb
* @author Sergey Tsypanov
*/
public class InetUtils implements Closeable {

// TODO: maybe shutdown the thread pool if it isn't being used?
private final ExecutorService executorService;

private final InetUtilsProperties properties;
Expand All @@ -47,7 +47,7 @@ public class InetUtils implements Closeable {

public InetUtils(final InetUtilsProperties properties) {
this.properties = properties;
this.executorService = Executors.newSingleThreadExecutor(r -> {
this.executorService = Executors.newCachedThreadPool(r -> {
Thread thread = new Thread(r);
thread.setName(InetUtilsProperties.PREFIX);
thread.setDaemon(true);
Expand Down

0 comments on commit 10d2e30

Please sign in to comment.