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 ParseLiveQuery closing all connections from server request #176

Merged
merged 3 commits into from
Jun 27, 2021

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Jun 27, 2021

Fixes a bug in LiveQuery when a close frame is sent from the server. The the close frame was received, all running websocket tasks were closed instead of the particular task the request was intended for.

  • Only close respective task/connection
  • Add a new delegate method named closedSocket() which provides the close code
    and reason the server closed the connection
  • Add test case
  • Add changelog entry

@codecov
Copy link

codecov bot commented Jun 27, 2021

Codecov Report

Merging #176 (6878c8f) into main (a9606df) will increase coverage by 0.07%.
The diff coverage is 46.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
+ Coverage   82.16%   82.23%   +0.07%     
==========================================
  Files          71       71              
  Lines        6643     6649       +6     
==========================================
+ Hits         5458     5468      +10     
+ Misses       1185     1181       -4     
Impacted Files Coverage Δ
...t/LiveQuery/Protocols/ParseLiveQueryDelegate.swift 16.66% <0.00%> (+16.66%) ⬆️
Sources/ParseSwift/LiveQuery/LiveQuerySocket.swift 60.00% <33.33%> (-2.91%) ⬇️
Sources/ParseSwift/LiveQuery/ParseLiveQuery.swift 76.81% <100.00%> (+1.08%) ⬆️
Sources/ParseSwift/Objects/ParseUser.swift 81.52% <0.00%> (-0.16%) ⬇️
Sources/ParseSwift/Types/Query.swift 93.38% <0.00%> (+0.17%) ⬆️
Sources/ParseSwift/Coding/ParseEncoder.swift 75.16% <0.00%> (+0.32%) ⬆️
Sources/ParseSwift/Coding/AnyEncodable.swift 61.84% <0.00%> (+0.65%) ⬆️

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 a9606df...6878c8f. Read the comment docs.

@cbaker6 cbaker6 closed this Jun 27, 2021
@cbaker6 cbaker6 reopened this Jun 27, 2021
@cbaker6 cbaker6 merged commit 94c7474 into main Jun 27, 2021
@cbaker6 cbaker6 deleted the liveQueryClose branch June 27, 2021 22:05
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

1 participant