This is an automated email from the ASF dual-hosted git repository.
mdedetrich pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 29b7d22e29 Use duration converters for close()
29b7d22e29 is described below
commit 29b7d22e29625a59e3424f5352e4cd7c3b59d984
Author: Matthew de Detrich <[email protected]>
AuthorDate: Tue Nov 18 11:56:27 2025 +0100
Use duration converters for close()
---
actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala
b/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala
index dd4cdfb885..674ad6af99 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala
@@ -24,6 +24,7 @@ import scala.concurrent.{ Await, ExecutionContext,
ExecutionContextExecutor, Fut
import scala.concurrent.blocking
import scala.concurrent.duration.Duration
import scala.jdk.CollectionConverters._
+import scala.jdk.DurationConverters._
import scala.jdk.FutureConverters._
import scala.jdk.OptionConverters._
import scala.util.{ Failure, Success, Try }
@@ -1102,10 +1103,8 @@ private[pekko] class ActorSystemImpl(
override def close(): Unit = {
terminate()
- val duration =
-
Duration(settings.config.getDuration("pekko.coordinated-shutdown.close-actor-system-timeout").toMillis,
- TimeUnit.MILLISECONDS)
- Await.result(whenTerminated, duration)
+ Await.result(whenTerminated,
+
settings.config.getDuration("pekko.coordinated-shutdown.close-actor-system-timeout").toScala)
}
override private[pekko] def finalTerminate(): Unit = {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]