mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 17:28:46 +03:00
making Netty's EventLoopGroup shutdown's eager (#1255)
This commit is contained in:
parent
d15f952dcc
commit
e50222ce30
@ -198,7 +198,9 @@ final class Server private (
|
||||
logger.info("Shutting down server...")
|
||||
server.shutdownNow()
|
||||
assume(server.awaitTermination(10, TimeUnit.SECONDS))
|
||||
serverEventLoopGroup.shutdownGracefully().await(10L, TimeUnit.SECONDS)
|
||||
serverEventLoopGroup
|
||||
.shutdownGracefully(0, 0, TimeUnit.SECONDS)
|
||||
.await(10, TimeUnit.SECONDS)
|
||||
serverEsf.close()
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,9 @@ class RemoteServerResource(host: String, port: Int, tlsConfig: Option[TlsConfigu
|
||||
override def close(): Unit = {
|
||||
channel.shutdownNow()
|
||||
channel.awaitTermination(1L, TimeUnit.SECONDS)
|
||||
eventLoopGroup.shutdownGracefully().await(1L, TimeUnit.SECONDS)
|
||||
eventLoopGroup
|
||||
.shutdownGracefully(0, 0, TimeUnit.SECONDS)
|
||||
.await(10L, TimeUnit.SECONDS)
|
||||
channel = null
|
||||
eventLoopGroup = null
|
||||
}
|
||||
|
@ -52,7 +52,9 @@ class SandboxServerResource(sandboxConfig: SandboxConfig) extends Resource[Platf
|
||||
override def close(): Unit = {
|
||||
channel.shutdownNow()
|
||||
channel.awaitTermination(5L, TimeUnit.SECONDS)
|
||||
eventLoopGroup.shutdownGracefully().await(10L, TimeUnit.SECONDS)
|
||||
eventLoopGroup
|
||||
.shutdownGracefully(0, 0, TimeUnit.SECONDS)
|
||||
.await(10L, TimeUnit.SECONDS)
|
||||
sandboxServer.close()
|
||||
channel = null
|
||||
eventLoopGroup = null
|
||||
|
@ -46,7 +46,9 @@ class SandboxServerResource(config: => SandboxConfig) extends Resource[Channel]
|
||||
|
||||
override def close(): Unit = {
|
||||
channel.shutdownNow()
|
||||
eventLoopGroup.shutdownGracefully().await(10L, TimeUnit.SECONDS)
|
||||
eventLoopGroup
|
||||
.shutdownGracefully(0, 0, TimeUnit.SECONDS)
|
||||
.await(10L, TimeUnit.SECONDS)
|
||||
sandboxServer.close()
|
||||
channel = null
|
||||
eventLoopGroup = null
|
||||
|
Loading…
Reference in New Issue
Block a user