Skip to content

Commit 3b627c8

Browse files
committed
1 parent 6a5c7c0 commit 3b627c8

File tree

3 files changed

+2
-38
lines changed

3 files changed

+2
-38
lines changed

src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveStreams.DotNet.verified.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4128,10 +4128,6 @@ namespace Akka.Streams.Implementation.Fusing
41284128
protected override Akka.Streams.Stage.GraphStageLogic CreateLogic(Akka.Streams.Attributes inheritedAttributes) { }
41294129
public override string ToString() { }
41304130
}
4131-
public class DownstreamCompletedWithNoCauseException : System.Exception
4132-
{
4133-
public DownstreamCompletedWithNoCauseException() { }
4134-
}
41354131
[Akka.Annotations.InternalApiAttribute()]
41364132
public sealed class Expand<TIn, TOut> : Akka.Streams.Stage.GraphStage<Akka.Streams.FlowShape<TIn, TOut>>
41374133
{

src/core/Akka.Streams/Implementation/Fusing/DownstreamCompletedWithNoCauseException.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/core/Akka.Streams/Stage/GraphStage.cs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,25 +1297,10 @@ public void InternalOnDownstreamFinish(Exception cause)
12971297
{
12981298
try
12991299
{
1300+
if (cause == null)
1301+
throw new ArgumentException("Cancellation cause must not be null", nameof(cause));
13001302
if (_lastCancellationCause != null)
13011303
throw new ArgumentException("OnDownstreamFinish must not be called recursively", nameof(cause));
1302-
1303-
// Some stages might propagate null exceptions due to improper Task continuation handling
1304-
// (see https://github.com/akkadotnet/Akka.Persistence.Sql/issues/498)
1305-
// This is a stop gap solution to make sure that Akka.Streams doesn't behave improperly
1306-
// until we can fix all of those
1307-
if (cause is null)
1308-
{
1309-
try
1310-
{
1311-
throw new DownstreamCompletedWithNoCauseException();
1312-
}
1313-
catch (DownstreamCompletedWithNoCauseException e)
1314-
{
1315-
cause = e;
1316-
}
1317-
}
1318-
13191304
_lastCancellationCause = cause;
13201305
CancelStage(_lastCancellationCause);
13211306
}

0 commit comments

Comments
 (0)