File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
Sources/ParseSwift/LiveQuery Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -211,11 +211,6 @@ public final class ParseLiveQuery: NSObject {
211
211
close ( useDedicatedQueue: false )
212
212
authenticationDelegate = nil
213
213
receiveDelegate = nil
214
- if task != nil {
215
- URLSession . liveQuery. delegates. removeValue ( forKey: task)
216
- } else {
217
- task = nil
218
- }
219
214
}
220
215
}
221
216
@@ -518,8 +513,8 @@ extension ParseLiveQuery {
518
513
if error == nil {
519
514
self . isConnecting = true
520
515
}
516
+ completion ( error)
521
517
}
522
- completion ( nil )
523
518
} catch {
524
519
completion ( error)
525
520
}
Original file line number Diff line number Diff line change @@ -316,14 +316,15 @@ class ParseLiveQueryTests: XCTestCase {
316
316
}
317
317
client. isSocketEstablished = true // Socket neets to be true
318
318
client. isConnecting = true
319
- client. attempts = 50
320
319
client. isConnected = true
320
+ client. attempts = 5
321
321
client. clientId = " yolo "
322
+ client. isDisconnectedByUser = false
322
323
323
324
XCTAssertEqual ( client. isSocketEstablished, true )
324
325
XCTAssertEqual ( client. isConnecting, false )
325
326
XCTAssertEqual ( client. clientId, " yolo " )
326
- XCTAssertEqual ( client. attempts, 1 )
327
+ XCTAssertEqual ( client. attempts, 5 )
327
328
}
328
329
329
330
func testDisconnectedState( ) throws {
@@ -384,7 +385,7 @@ class ParseLiveQueryTests: XCTestCase {
384
385
XCTAssertEqual ( client. clientId, " yolo " )
385
386
client. close ( )
386
387
387
- XCTAssertEqual ( client. isSocketEstablished, true )
388
+ XCTAssertEqual ( client. isSocketEstablished, false )
388
389
XCTAssertEqual ( client. isConnected, false )
389
390
XCTAssertEqual ( client. isConnecting, false )
390
391
XCTAssertNil ( client. clientId)
You can’t perform that action at this time.
0 commit comments