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

Fix arguments to on_close

This commit is contained in:
Matthew Draper 2016-01-25 03:55:05 +10:30
parent 74497eabd5
commit a928aa3d3f
2 changed files with 3 additions and 5 deletions

View file

@ -129,7 +129,7 @@ module ActionCable
# ignore
end
def on_close # :nodoc:
def on_close(reason, code) # :nodoc:
send_async :handle_close
end

View file

@ -37,6 +37,7 @@ module ActionCable
@url = ClientSocket.determine_url(@env)
@driver = @driver_started = nil
@close_params = ['', 1006]
@ready_state = CONNECTING
@ -142,10 +143,7 @@ module ActionCable
return if @ready_state == CLOSED
@ready_state = CLOSED
reason = @close_params ? @close_params[0] : ''
code = @close_params ? @close_params[1] : 1006
@event_target.on_close(code, reason)
@event_target.on_close(*@close_params)
end
end
end