File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Sources/Entwine/Operators Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ extension Publishers {
112112 }
113113
114114 func receive( completion: Subscribers . Completion < Downstream . Failure > ) {
115+ terminateSubscription ( )
115116 _ = queue. enqueue ( completion: completion)
116117 }
117118
@@ -124,6 +125,7 @@ extension Publishers {
124125 func terminateSubscription( ) {
125126 otherSink. terminateSubscription ( )
126127 upstreamSubscription? . cancel ( )
128+ upstreamSubscription = nil
127129 }
128130 }
129131
@@ -160,6 +162,7 @@ extension Publishers {
160162
161163 func terminateSubscription( ) {
162164 subscription? . cancel ( )
165+ subscription = nil
163166 }
164167 }
165168}
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ final class MaterializeTests: XCTestCase {
4444
4545 func testMaterializesEmpty( ) {
4646
47- let results1 = scheduler. start { Publishers . Empty < Int , Never > ( ) . materialize ( ) }
47+ let results1 = scheduler. start { Empty < Int , Never > ( ) . materialize ( ) }
4848
4949 let expected1 : TestSequence < Signal < Int , Never > , Never > = [
5050 ( 200 , . subscription) ,
@@ -60,7 +60,7 @@ final class MaterializeTests: XCTestCase {
6060
6161 enum MaterializedError : Error { case error }
6262
63- let results1 = scheduler. start { Publishers . Fail < Int , MaterializedError > ( error: . error) . materialize ( ) }
63+ let results1 = scheduler. start { Fail < Int , MaterializedError > ( error: . error) . materialize ( ) }
6464
6565 let expected1 : TestSequence < Signal < Int , MaterializedError > , Never > = [
6666 ( 200 , . subscription) ,
You can’t perform that action at this time.
0 commit comments