Skip to content

Commit 1a5a4f9

Browse files
serges147kzaher
authored andcommitted
Fix for issue ReactiveX#1494 "Infinite recursion in SerialDisposable.disposable getter."
1 parent 6d287c5 commit 1a5a4f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RxSwift/Disposables/SerialDisposable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public final class SerialDisposable : DisposeBase, Cancelable {
3434
public var disposable: Disposable {
3535
get {
3636
return _lock.calculateLocked {
37-
return self.disposable
37+
return _current ?? Disposables.create()
3838
}
3939
}
4040
set (newDisposable) {

0 commit comments

Comments
 (0)