File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
spring-cloud-commons/src/main/java/org/springframework/cloud/commons/util Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2012-2020 the original author or authors.
2+ * Copyright 2012-2024 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
3535
3636/**
3737 * @author Spencer Gibb
38+ * @author Sergey Tsypanov
3839 */
3940public class InetUtils implements Closeable {
4041
41- // TODO: maybe shutdown the thread pool if it isn't being used?
4242 private final ExecutorService executorService ;
4343
4444 private final InetUtilsProperties properties ;
@@ -47,7 +47,7 @@ public class InetUtils implements Closeable {
4747
4848 public InetUtils (final InetUtilsProperties properties ) {
4949 this .properties = properties ;
50- this .executorService = Executors .newSingleThreadExecutor (r -> {
50+ this .executorService = Executors .newCachedThreadPool (r -> {
5151 Thread thread = new Thread (r );
5252 thread .setName (InetUtilsProperties .PREFIX );
5353 thread .setDaemon (true );
You can’t perform that action at this time.
0 commit comments