1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #33288 from ioquatix/patch-2

Better compatibility with SPEC.
This commit is contained in:
Rafael França 2018-07-04 15:18:43 -04:00 committed by GitHub
commit 80a9510b75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,8 +98,10 @@ module ActionCable
def hijack_rack_socket
return unless @socket_object.env["rack.hijack"]
@socket_object.env["rack.hijack"].call
@rack_hijack_io = @socket_object.env["rack.hijack_io"]
# This should return the underlying io according to the SPEC:
@rack_hijack_io = @socket_object.env["rack.hijack"].call
# Retain existing behaviour if required:
@rack_hijack_io ||= @socket_object.env["rack.hijack_io"]
@event_loop.attach(@rack_hijack_io, self)
end