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/incubator-pekko-connectors.git

commit 87b6625f0300c16051e0752866cafec0090fe6a4
Author: João Ferreira <[email protected]>
AuthorDate: Wed Feb 7 12:51:07 2024 +0000

    fix postStop so shutdown is not done in a fire-forget future
---
 .../stream/connectors/kinesis/impl/KinesisSchedulerSourceStage.scala   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/kinesis/src/main/scala/org/apache/pekko/stream/connectors/kinesis/impl/KinesisSchedulerSourceStage.scala
 
b/kinesis/src/main/scala/org/apache/pekko/stream/connectors/kinesis/impl/KinesisSchedulerSourceStage.scala
index fa1b6b3fe..929bfcb6c 100644
--- 
a/kinesis/src/main/scala/org/apache/pekko/stream/connectors/kinesis/impl/KinesisSchedulerSourceStage.scala
+++ 
b/kinesis/src/main/scala/org/apache/pekko/stream/connectors/kinesis/impl/KinesisSchedulerSourceStage.scala
@@ -113,7 +113,8 @@ private[kinesis] class KinesisSchedulerSourceStage(
     }
     override def postStop(): Unit =
       schedulerOpt.foreach(scheduler =>
-        Future(if (!scheduler.shutdownComplete()) 
scheduler.shutdown())(materializer.executionContext))
+        if (!scheduler.shutdownComplete()) scheduler.shutdown()
+      )
 
     protected def executionContext(attributes: Attributes): ExecutionContext = 
{
       val dispatcherId = 
(attributes.get[ActorAttributes.Dispatcher](ActorAttributes.IODispatcher) match 
{


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to