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

Pull commits from parent repository #1

Merged
merged 71 commits into from
Aug 2, 2023
Merged

Conversation

andrews-moc
Copy link

No description provided.

ostap0207 and others added 30 commits February 21, 2019 09:04
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
dsrees and others added 29 commits March 19, 2021 18:06
Uploading to Maven Central to replace JCenter shutdown
Updated client to match swift client
Unwrap response from within a reply payload
* Upgrades test dependencies
Include the payload as a json string in message
@ostap0207 ostap0207 merged commit 72b80b5 into salemove:master Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

8 participants