Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LiveQuery reconnection bug #172

Merged
merged 14 commits into from
Jun 26, 2021
Merged

Fix LiveQuery reconnection bug #172

merged 14 commits into from
Jun 26, 2021

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Jun 23, 2021

Provides a number of essential fixes and updates to ParseLiveQuery:

  • Add sendPing and sendPingPublisher for LiveQuery web socket connections
  • Add openPublisher for LiveQuery
  • Fix bug where a web socket task was being reused after it was closed resulting in the inability to reconnect
  • Improve LiveQuery by closing the respective web socket connection when no more subscriptions exist
  • Improve error handling in LiveQuery
  • Improve not throwing an error when having multiple subscriptions and only unsubscribing from one
  • Add testcases
  • Update playground examples
  • Add changelog entry

@codecov
Copy link

codecov bot commented Jun 23, 2021

Codecov Report

Merging #172 (068525c) into main (f877b37) will decrease coverage by 0.10%.
The diff coverage is 83.33%.

❗ Current head 068525c differs from pull request most recent head 221944e. Consider uploading reports for the commit 221944e to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #172      +/-   ##
==========================================
- Coverage   82.20%   82.09%   -0.11%     
==========================================
  Files          70       71       +1     
  Lines        6596     6641      +45     
==========================================
+ Hits         5422     5452      +30     
- Misses       1174     1189      +15     
Impacted Files Coverage Δ
...t/LiveQuery/Protocols/ParseLiveQueryDelegate.swift 20.00% <ø> (+20.00%) ⬆️
Sources/ParseSwift/LiveQuery/LiveQuerySocket.swift 62.90% <40.00%> (+1.49%) ⬆️
.../ParseSwift/LiveQuery/ParseLiveQuery+combine.swift 71.42% <71.42%> (ø)
Sources/ParseSwift/LiveQuery/ParseLiveQuery.swift 76.03% <92.68%> (+1.62%) ⬆️
Sources/ParseSwift/Internal/Data+hexString.swift 68.96% <0.00%> (-31.04%) ⬇️
Sources/ParseSwift/Coding/AnyEncodable.swift 61.18% <0.00%> (-0.66%) ⬇️
Sources/ParseSwift/Objects/ParseObject.swift 77.27% <0.00%> (-0.27%) ⬇️
Sources/ParseSwift/Types/Query.swift 93.20% <0.00%> (-0.18%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f877b37...221944e. Read the comment docs.

@cbaker6 cbaker6 changed the title Add ParseLiveQuery ping/pong Fix LiveQuery reconnection bug Jun 25, 2021
@cbaker6 cbaker6 requested a review from TomWFox June 25, 2021 20:40
@cbaker6
Copy link
Contributor Author

cbaker6 commented Jun 25, 2021

@TomWFox can you kindly look through the added docs?

Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
@cbaker6 cbaker6 merged commit 2e9b772 into main Jun 26, 2021
@cbaker6 cbaker6 deleted the livequeryPong branch June 26, 2021 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants