File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
core/src/main/java/com/google/cloud/sql/core Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -112,10 +112,15 @@ public final class CoreSocketFactory {
112112 this .credential = credential ;
113113 this .adminApi = adminApi ;
114114 this .serverProxyPort = serverProxyPort ;
115+
116+ // TODO(kvg): Figure out correct way to determine number of threads
117+ ScheduledThreadPoolExecutor executor =
118+ (ScheduledThreadPoolExecutor ) Executors .newScheduledThreadPool (2 );
119+ executor .setExecuteExistingDelayedTasksAfterShutdownPolicy (false );
120+
115121 this .executor =
116122 MoreExecutors .listeningDecorator (
117- MoreExecutors .getExitingScheduledExecutorService (
118- (ScheduledThreadPoolExecutor ) Executors .newScheduledThreadPool (2 )));
123+ MoreExecutors .getExitingScheduledExecutorService (executor ));
119124 }
120125
121126 /** Returns the {@link CoreSocketFactory} singleton. */
You can’t perform that action at this time.
0 commit comments