Skip to content

Fix socket.ex docu#1303

Merged
chrismccord merged 1 commit intophoenixframework:masterfrom
ephe-meral:master
Oct 17, 2015
Merged

Fix socket.ex docu#1303
chrismccord merged 1 commit intophoenixframework:masterfrom
ephe-meral:master

Conversation

@ephe-meral
Copy link
Copy Markdown
Contributor

MyApp.Endpoint.broadcast/2 is not generated by default by the endpoint, needs to have a 3rd parameter as well.

@ephe-meral
Copy link
Copy Markdown
Contributor Author

Generally speaking this sample line might be misleading...
I thought it would do the things that it says in the comment, however this will only happen if the channels define a handler for this event, no?
(So it doesn't automatically disconnect anything?)

This would be useful feature though, to kick all the sockets / channels at the same time by force...

@chrismccord
Copy link
Copy Markdown
Member

No, it does forcefully kick the multiplexed socket, i.e.
https://github.com/phoenixframework/phoenix/blob/master/lib/phoenix/transports/websocket.ex#L140-L143

Thanks!

chrismccord added a commit that referenced this pull request Oct 17, 2015
@chrismccord chrismccord merged commit 5561692 into phoenixframework:master Oct 17, 2015
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.

2 participants