Skip to content

Commit

Permalink
Complete async Observable on CancellationError
Browse files Browse the repository at this point in the history
  • Loading branch information
freak4pc committed Oct 4, 2024
1 parent 662d91b commit ef1d4de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions RxSwift/Observable+Concurrency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public extension AsyncSequence {
observer.onNext(value)
}

observer.onCompleted()
} catch is CancellationError {
observer.onCompleted()
} catch {
observer.onError(error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Foundation
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
public extension PrimitiveSequenceType where Trait == SingleTrait {
/**
Creates an `Single` from the result of an asynchronous operation
Creates a `Single` from the result of an asynchronous operation

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

Expand Down

0 comments on commit ef1d4de

Please sign in to comment.