File tree 1 file changed +3
-2
lines changed
ktor-server/ktor-server-jetty/jvm/src/io/ktor/server/jetty
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import io.ktor.util.pipeline.*
13
13
import kotlinx.coroutines.*
14
14
import org.eclipse.jetty.server.*
15
15
import org.eclipse.jetty.server.handler.*
16
- import java.io.*
17
16
import java.util.concurrent.*
18
17
import java.util.concurrent.CancellationException
19
18
import java.util.concurrent.atomic.*
@@ -25,6 +24,8 @@ private val JettyCallHandlerCoroutineName = CoroutineName("jetty-call-handler")
25
24
26
25
private val JettyKtorCounter = AtomicLong ()
27
26
27
+ private const val THREAD_KEEP_ALIVE_TIME = 1L
28
+
28
29
internal class JettyKtorHandler (
29
30
val environment : ApplicationEngineEnvironment ,
30
31
private val pipeline : () -> EnginePipeline ,
@@ -36,7 +37,7 @@ internal class JettyKtorHandler(
36
37
private val executor = ThreadPoolExecutor (
37
38
configuration.callGroupSize,
38
39
configuration.callGroupSize * 8 ,
39
- 1L ,
40
+ THREAD_KEEP_ALIVE_TIME ,
40
41
TimeUnit .MINUTES ,
41
42
queue
42
43
) { r ->
You can’t perform that action at this time.
0 commit comments