From db53e67cd3a113fd2d63cbfb7bcdefa4ad05a82b Mon Sep 17 00:00:00 2001 From: He-Pin Date: Fri, 19 Jan 2024 20:26:31 +0800 Subject: [PATCH] chore: Clean up some duplicated code. --- .../org/apache/pekko/stream/impl/fusing/Ops.scala | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala index 468f287d365..c047984ebb4 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/impl/fusing/Ops.scala @@ -193,9 +193,8 @@ import pekko.util.ccompat._ } catch { case NonFatal(ex) => decider(ex) match { - case Supervision.Stop => failStage(ex) - case Supervision.Resume => if (!hasBeenPulled(in)) pull(in) - case Supervision.Restart => if (!hasBeenPulled(in)) pull(in) + case Supervision.Stop => failStage(ex) + case _ => pull(in) } } @@ -267,9 +266,8 @@ private[stream] object Collect { } catch { case NonFatal(ex) => decider(ex) match { - case Supervision.Stop => failStage(ex) - case Supervision.Resume => if (!hasBeenPulled(in)) pull(in) - case Supervision.Restart => if (!hasBeenPulled(in)) pull(in) + case Supervision.Stop => failStage(ex) + case _ => pull(in) } }