Skip to content

Commit 0df0947

Browse files
committed
ActionCable: Allow pass code and reason when closing a WebSocket connection
1 parent b8de253 commit 0df0947

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

actioncable/lib/action_cable/connection/web_socket.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def transmit(data)
2626
websocket.transmit data
2727
end
2828

29-
def close
30-
websocket.close
29+
def close(code = nil, reason = nil)
30+
websocket.close code, reason
3131
end
3232

3333
def protocol

0 commit comments

Comments
 (0)