File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Sources/Lifecycle/AutoCancel Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ extension Subscribers {
132132 }
133133
134134 public func receive( subscription: Subscription ) {
135- lock. lock ( ) ; defer { lock. lock ( ) }
135+ lock. lock ( ) ; defer { lock. unlock ( ) }
136136
137137 self . subscription = subscription
138138
@@ -143,14 +143,14 @@ extension Subscribers {
143143 }
144144
145145 public func receive( _ input: Input ) -> Subscribers . Demand {
146- lock. lock ( ) ; defer { lock. lock ( ) }
146+ lock. lock ( ) ; defer { lock. unlock ( ) }
147147
148148 receivers? . receiveValue ? ( input)
149149 return . unlimited
150150 }
151151
152152 public func receive( completion: Subscribers . Completion < Failure > ) {
153- lock. lock ( ) ; defer { lock. lock ( ) }
153+ lock. lock ( ) ; defer { lock. unlock ( ) }
154154
155155 receivers? . receiveCompletion ? ( completion)
156156
@@ -165,7 +165,7 @@ extension Subscribers {
165165 }
166166
167167 public func cancel( ) {
168- lock. lock ( ) ; defer { lock. lock ( ) }
168+ lock. lock ( ) ; defer { lock. unlock ( ) }
169169
170170 guard subscription != nil else {
171171 clear ( )
You can’t perform that action at this time.
0 commit comments