mirror of
https://github.com/faye/websocket-driver-ruby.git
synced 2025-11-01 13:59:38 +00:00
Catch errors with close frames with invalid UTF-8.
This commit is contained in:
@@ -143,7 +143,9 @@ module WebSocket
|
||||
end
|
||||
|
||||
def handle_close(code, reason)
|
||||
shutdown(code, reason)
|
||||
reason = Driver.encode(reason, UNICODE)
|
||||
code = Hybi::ERRORS[:protocol_error] if reason.nil? # TODO emit error
|
||||
shutdown(code, reason || '')
|
||||
end
|
||||
|
||||
def handle_ping(payload)
|
||||
|
||||
Reference in New Issue
Block a user