forked from dsrees/JavaPhoenixClient
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pull commits from parent repository #1
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently `isConnected` is true when `connection` exists. However, this is different from JS and Swift implementations. In [JS][1] and [Swift][2] implementations `isConnected` is true only when the socket is actually connected. One of the problems this causes was the channels were closed during the following scenario: 1. WebSocket connection established, one channel is joined.. 2. Internet/Wifi disabled -> connection fails. 3. We periodically call `phxSocket.connect()` to reconnect. 4. Channels [try to rejoin as `isConnected` is true][4], but `phx_join` messages are being queued instead as connection is still not established. 5. Internet/Wifi enabled -> multiple queued `phx_join` messages are sent, Phoniex Server relies `phx_close` to all join messages but last. On `phx_close` the channel is removed from the socket, even tho the logs show that the state is being received. `connect` method is changed to use `connection != null` check, the same way it's done in [JS version][3]. [1]: https://github.com/phoenixframework/phoenix/blob/93db5ff3adf4c91a1ff1996e819e7dd5dfbddf1a/assets/js/phoenix.js#L906 [2]: https://github.com/davidstump/SwiftPhoenixClient/blob/ade5c27051a96aeeedff1594cb3e176b57a02f96/Sources/Socket.swift#L180 [3]: https://github.com/phoenixframework/phoenix/blob/93db5ff3adf4c91a1ff1996e819e7dd5dfbddf1a/assets/js/phoenix.js#L782 [4]: https://github.com/dsrees/JavaPhoenixClient/blob/master/src/main/kotlin/org/phoenixframework/PhxChannel.kt#L74
* Ensure that timeouts remove reply bindings * Remove unused imports in test * requested changes for timeout fix
* Created new class files * Channel implmentation * Fnished channel and socket classes * Finished presence implementatin * Bump dependency versions
* Added jacoco for tests coverage * Added test for WebSocket Transport * Initial socket tests * Almost done with socket tests * Finished Socket tets * Added test for message * Getting channel tests started and updated kotlin plugin * getting to the hard stuff like testing time * Converted to use wrapper around schedule executor * Fixed bug in manual queue, passing timeout tests * Adding a lot of push-channel test * Finish channel specs * Deleting old client classes, starting presence tests * Making presence immutable: * progress with presence tests' * Fixed clone issues, finished sync tests * Finished presence tests * fixing some tests * Adding license
* Fixed failures not triggering reconnect strategy * Added tests for transport reconnect
* Chat example * Added example and fixed reconnect issues * bump client version * cleanup * Building using jar
* Converted all tests to Junit5 * Adding Jacoco test coverage
* Added new rejoin and reconnect defaults * Updated socket to track abnormal close * Updated transport to call onClose after onError
* Updated ManualDispatchQueue to run items scheduled during a tick * Added reset test * Updated channel tests to account for the timer behavior properly
* Refactored channel rejoins * Finished up channel test changes
Uploading to Maven Central to replace JCenter shutdown
Updated client to match swift client
fixed socket release logic
Allow providing params via a closure
Added EncodeClosure and DecodeClosure
Unwrap response from within a reply payload
* Upgrades test dependencies
Using json serializer v2
Include the payload as a json string in message
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.