Skip to content

Commit 35db794

Browse files
committed
stop should return future before shutdown
1 parent edf98c7 commit 35db794

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/com/sclasen/akka/kafka/AkkaDirectConsumer.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class AkkaDirectConsumer[Key,Msg](props:AkkaDirectConsumerProps[Key,Msg]) {
7878
()
7979
}
8080

81-
def stop():Future[Unit] = {
81+
def stop():Future[Unit] = Future{
8282
connector.shutdown()
8383
executor.shutdown()
8484
try {
@@ -89,7 +89,7 @@ class AkkaDirectConsumer[Key,Msg](props:AkkaDirectConsumerProps[Key,Msg]) {
8989
case e:InterruptedException =>
9090
props.system.log.warning("Interrupted during shutdown, exiting uncleanly");
9191
}
92-
Future.successful(Unit)
92+
()
9393
}
9494
}
9595

0 commit comments

Comments
 (0)