Skip to content

Commit ef1d4de

Browse files
committed
Complete async Observable on CancellationError
1 parent 662d91b commit ef1d4de

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

RxSwift/Observable+Concurrency.swift

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public extension AsyncSequence {
6666
observer.onNext(value)
6767
}
6868

69+
observer.onCompleted()
70+
} catch is CancellationError {
6971
observer.onCompleted()
7072
} catch {
7173
observer.onError(error)

RxSwift/Traits/PrimitiveSequence/PrimitiveSequence+Concurrency.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Foundation
1212
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
1313
public extension PrimitiveSequenceType where Trait == SingleTrait {
1414
/**
15-
Creates an `Single` from the result of an asynchronous operation
15+
Creates a `Single` from the result of an asynchronous operation
1616

1717
- seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html)
1818

0 commit comments

Comments
 (0)