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

Action Cable: Establish WebSocket connection when first subscription is created #24036

Merged
merged 1 commit into from Mar 3, 2016

Conversation

Projects
None yet
5 participants
@javan
Member

javan commented Mar 3, 2016

Re: #24026

  • More intention revealing than connecting on the first call to Connection#send
  • Fixes that calls to Connection#send would attempt to open a connection when the WebSocket's state is CONNECTING
Establish WebSocket connection when first subscription is created. Fixes
 #24026

* More intention revealing than connecting on the first call to Connection#send
* Fixes that calls to Connection#send would attempt to open a connection when the WebSocket's state is CONNECTING
@rails-bot

This comment has been minimized.

rails-bot commented Mar 3, 2016

r? @rafaelfranca

(@rails-bot has picked a reviewer for you, use r? to override)

@@ -47,10 +44,10 @@ class ActionCable.Connection
isOpen: ->
@isState("open")
# Private
isActive: ->
@isState("open", "connecting")

This comment has been minimized.

@javan

javan Mar 3, 2016

Member

Renamed isAlive to isActive (and inverted the state condition) because I feel it's a more accurate description. Functionally, the methods are the same.

jeremy added a commit that referenced this pull request Mar 3, 2016

Merge pull request #24036 from javan/actioncable-lazy-connect
Action Cable: Establish WebSocket connection when first subscription is created

@jeremy jeremy merged commit 211fd1b into rails:master Mar 3, 2016

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment