Skip to content

Conversation

@Yoann-Abbes
Copy link
Contributor

@Yoann-Abbes Yoann-Abbes commented Feb 17, 2021

What does this PR do?

React Native WebSocket library throw an error when a message is sent through the socket while its state is still "CONNECTING".
Fix this issue by preventing send pings until its "OPEN"

@codecov
Copy link

codecov bot commented Feb 17, 2021

Codecov Report

Merging #605 (b944cf6) into master (eec36a6) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #605      +/-   ##
==========================================
- Coverage   86.60%   86.54%   -0.06%     
==========================================
  Files          33       33              
  Lines        1500     1501       +1     
  Branches      261      262       +1     
==========================================
  Hits         1299     1299              
- Misses        148      149       +1     
  Partials       53       53              
Impacted Files Coverage Δ
src/protocols/WebSocket.ts 76.13% <0.00%> (-0.88%) ⬇️
src/protocols/abstract/Realtime.ts 94.59% <ø> (ø)

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 eec36a6...4663e50. Read the comment docs.

@Yoann-Abbes Yoann-Abbes changed the title [HOTFIX] Define client behavior after connection opened [HOTFIX] Make sure pings are sent after the connection state is 'connected'. Feb 17, 2021
@Yoann-Abbes Yoann-Abbes marked this pull request as ready for review February 17, 2021 23:48
@Yoann-Abbes Yoann-Abbes requested a review from Aschen February 17, 2021 23:49
@Yoann-Abbes Yoann-Abbes marked this pull request as draft February 18, 2021 12:53
@Yoann-Abbes Yoann-Abbes marked this pull request as ready for review February 18, 2021 15:07
@Yoann-Abbes Yoann-Abbes changed the title [HOTFIX] Make sure pings are sent after the connection state is 'connected'. [HOTFIX] Check client readyState before sending pings Feb 18, 2021
@Yoann-Abbes Yoann-Abbes merged commit 9eaf648 into master Feb 18, 2021
@Yoann-Abbes Yoann-Abbes deleted the fix-ping-pong-initialisation branch February 18, 2021 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants