aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Start Rails 5.2 developmentMatthew Draper2017-03-221-2/+2
|
* Preparing for 5.1.0.beta1 releaseRafael Mendonça França2017-02-231-1/+1
|
* Deprecate the EventedRedis subscription adapterMatthew Draper2017-02-231-0/+6
| | | | | Unlike Faye support, it seems a bit too documented to remove without warning. So, here's a warning.
* Move some ActionCable logs to debug levelMartijn Storck2017-02-062-2/+2
|
* Add channel_prefix support to ActionCable redis/evented_redis adapters.Chad Ingram2017-01-174-0/+31
|
* Fix missing bracket.Eugene2017-01-141-1/+1
| | | Fix missing left bracket in exception message.
* Reduce string objects by using \ instead of + or << for concatenating stringsAkira Matsuda2017-01-121-2/+2
| | | | (I personally prefer writing one string in one line no matter how long it is, though)
* `self.` is not needed when calling its own instance methodAkira Matsuda2017-01-052-3/+3
| | | | Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
* Bump license years for 2017Jon Moss2016-12-311-1/+1
| | | | | | | | Per https://www.timeanddate.com/counters/firstnewyear.html, it's already 2017 in a lot of places, so we should bump the Rails license years to 2017. [ci skip]
* Privatize unneededly protected methods in Action CableAkira Matsuda2016-12-244-24/+23
|
* Describe what we are protectingAkira Matsuda2016-12-234-0/+8
|
* Fix typo in channel generator usage messageCarlos Eduardo Monti2016-12-191-2/+2
|
* ActionCable::Connection::Base doc code sample syntax errorMSP-Greg2016-12-061-4/+1
|
* Prevent race condition when launching EventMachine reactorMatthew Draper2016-11-301-2/+2
| | | | | | | reactor_running? will be true just after the thread enters EventMachine.run; reactor_thread only gets set after the internal initialize_event_machine method has been called, the C extension is set up, and it is entering its run loop.
* use correct value in example [ci skip]yuuji.yaginuma2016-11-141-1/+1
| | | | | Need to specify `reload` from turbolinks 5. Ref: 7225f0bb9fd1d71a7a37b53815c90178cc7319bd
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-294-4/+4
|
* Permit same-origin connections by defaultMatthew Draper2016-10-112-3/+3
| | | | | | | | | | | | | | | | | WebSocket always defers the decision to the server, because it didn't have to deal with legacy compatibility... but the same-origin policy is still a reasonable default. Origin checks do not protect against a directly connecting attacker -- they can lie about their host, but can also lie about their origin. Origin checks protect against a connection from 3rd-party controlled script in a context where a victim browser's cookies will be passed along. And if an attacker has breached that protection, they've already compromised the HTTP session, so treating the WebSocket connection in the same way seems reasonable. In case this logic proves incorrect (or anyone just wants to be more paranoid), we retain a config option to disable it.
* Merge pull request #26568 from skateman/cable-sameorigin-as-hostMatthew Draper2016-10-112-1/+5
|\ | | | | | | Optionally allow ActionCable requests from the same host as origin
| * Optionally allow ActionCable requests from the same host as originDávid Halász2016-09-212-1/+5
| | | | | | | | | | | | | | When the `allow_same_origin_as_host` is set to `true`, the request forgery protection permits `HTTP_ORIGIN` values starting with the corresponding `proto://` prefix followed by `HTTP_HOST`. This way it is not required to specify the list of allowed URLs.
* | Close the IO from the read loop threadMatthew Draper2016-10-062-1/+1
| | | | | | | | | | | | | | | | IO#close and IO#read across threads don't get along so well: After T1 enters #read and releases the GVL, T2 can call #close on the IO, thereby both closing the fd and freeing the buffer while T1 is using them.
* | Shut down the worker pool - don't kill itMatthew Draper2016-10-031-1/+1
| | | | | | | | | | Different parts of concurrent-ruby's documentation make inconsistent claims about how kill will behave. It doesn't do the thing we want.
* | Move behavior to Server::Base, and flush pubsubJon Moss2016-10-022-3/+6
| |
* | Shutdown pubsub connection before classes are reloadedJon Moss2016-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Before this patch, if you were to make a file edit in your Rails application and you tried to load up the page, it would hang indefinitely. The issue is that Active Record is trying to cleanup after itself and clear all active connection, but Action Cable is still holding onto a connection from the pool. To resolve this, we are now shutting down the pubsub adapter before classes are reloaded, to avoid this altogether (connection is being returned to the pool). Credits to @skateman for discovering this bug. :)
* | In-line the configuration points that only existed for Faye supportMatthew Draper2016-10-014-12/+4
| |
* | Remove Faye modeMatthew Draper2016-10-014-105/+3
| | | | | | | | No deprecation, because it was never documented.
* | Merge pull request #26547 from ↵Matthew Draper2016-10-013-18/+28
|\ \ | | | | | | | | | | | | | | | palkan/fix/actioncable-confirmation-race-condition Avoid race condition on subscription confirmation
| * | Add Channel#ensure_confirmation_sent; call #subscribe_to_channel after ↵palkan2016-09-223-27/+24
| | | | | | | | | | | | initializing
| * | [Fix #25381] Avoid race condition on subscription confirmationpalkan2016-09-203-10/+23
| | |
* | | Buffer writes to the cable socketsMatthew Draper2016-09-282-11/+92
| |/ |/| | | | | | | Otherwise, they can sometimes block, leading to reduced system throughput.
* | [ci skip] Fix formatting of documentation of worker_pool method from ↵Prathamesh Sonpatki2016-09-071-1/+1
| | | | | | | | AC::Server::Base
* | [ci skip] Fix formatting in Action Cable Connection::Base module docsPrathamesh Sonpatki2016-09-071-1/+1
| |
* | [ci fix] Fix API documentation for Streams module from Action CablePrathamesh Sonpatki2016-09-061-4/+4
|/
* fixes remaining RuboCop issues [Vipul A M, Xavier Noria]Xavier Noria2016-09-011-1/+1
|
* Prevent invocation of channel action if rejected connectionJon Moss2016-08-191-1/+1
| | | | | | | | | Fixes #23757. Before this commit, even if `reject` was called in the `subscribe` method for an Action Cable channel, all actions on that channel could still be invoked. This calls a `return` if a rejected connection tries to invoke any actions on the channel.
* copy-edits an exception messageXavier Noria2016-08-071-1/+1
| | | | | | | | | | | | | | Inserted spaces in the name of Rails components. Since I was on it, also used PostgreSQL instead of Postgres because albeit Postgres is an accepted alias, PostgreSQL is the official name and the actual name of the adapter. See https://wiki.postgresql.org/wiki/ProjectName with regard to PostgreSQL vs Postgres.
* Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty linesRyuta Kamizono2016-08-071-1/+0
|
* applies remaining conventions across the projectXavier Noria2016-08-061-3/+3
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in actioncable/libXavier Noria2016-08-0628-90/+90
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Give importance to rails command in the comment section.Santosh Wadghule2016-07-131-1/+1
|
* Merge pull request #25624 from tinco/actioncable_write_raceMatthew Draper2016-07-091-2/+7
|\ | | | | | | Fix race condition in websocket stream write
| * fix race condition in websocket stream writeTinco Andringa2016-07-011-0/+4
| |
* | Merge pull request #24988 from mwear/action_cable_broadcast_notificationsMatthew Draper2016-07-041-2/+6
|\ \ | | | | | | Add ActiveSupport::Notifications hook to ActionCable::Server.broadcast
| * | Add ActiveSupport::Notifications hook to Broadcaster#broadcastMatthew Wear2016-05-121-2/+6
| | | | | | | | | | | | | | | This addition of this notification hook will give users better visibility into the messages being sent over the PubSub adapter.
* | | Merge pull request #25030 from mmmpa/pull_requestMatthew Draper2016-07-041-1/+5
|\ \ \ | | | | | | | | ActionCable, sometimes add_channel is not called.
| * | | Add guard to broadcast.mmmpa2016-05-261-1/+5
| | | |
* | | | Merge pull request #25293 from y-yagi/remove_needless_commentsMatthew Draper2016-07-033-5/+0
|\ \ \ \ | | | | | | | | | | remove needless comments
| * | | | remove needless commentsyuuji.yaginuma2016-06-063-5/+0
| | | | | | | | | | | | | | | | | | | | Follow up to #25240.
* | | | | close hijacked i/o socket after use (fixes #25613)Tinco Andringa2016-07-011-0/+1
| |_|_|/ |/| | |
* | | | Periodic timers: delegate async instance_exec to the worker poolJeremy Daer2016-06-292-7/+9
| | | |