aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable/connection/stream.rb
Commit message (Collapse)AuthorAgeFilesLines
* Better compatibility with SPEC.Samuel Williams2018-07-041-2/+4
| | | | | | If `env` is duped or otherwise not the same as the original `env` that was generated at the top of rack middleware, it is impossible for the server hijack proc to update the right `env` instance. Therefore, capturing the return value is more reliable. This is the recommendation of the rack SPEC.
* Use frozen string literal in actioncable/Kir Shatrov2017-07-231-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Close the IO from the read loop threadMatthew Draper2016-10-061-1/+0
| | | | | | | | 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.
* Buffer writes to the cable socketsMatthew Draper2016-09-281-3/+54
| | | | | Otherwise, they can sometimes block, leading to reduced system throughput.
* applies new string literal convention in actioncable/libXavier Noria2016-08-061-5/+5
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* 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
| |
* | close hijacked i/o socket after use (fixes #25613)Tinco Andringa2016-07-011-0/+1
|/
* Gracefully handle disconnected clientsJeremy Daer2016-03-201-1/+1
| | | | | | | | We'll get `Errno::ECONNRESET` if the client forcibly disconnected. Just close the socket rather than raising the exception. Handle other errors in `ClientSocket#write`, too, mirroring the Faye error handling which swallows all `StandardError` on write.
* Only hijack Rack socket when first neededJon Moss2016-02-241-10/+8
| | | | Fixes #23471
* Revert "Revert "Eliminate the EventMachine dependency""Matthew Draper2016-01-301-0/+59
|
* Revert "Eliminate the EventMachine dependency"David Heinemeier Hansson2016-01-271-59/+0
|
* Import the relevant portions of faye-websocketMatthew Draper2016-01-241-0/+59
(as adapted to use concurrent-ruby / nio4r instead of eventmachine)