Skip to content

Commit

Permalink
Emit an error event *after* setting the ready state to 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Jul 8, 2015
1 parent 5764488 commit f1fd96e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/websocket/driver/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def handshake_request

def fail_handshake(message)
message = "Error during WebSocket handshake: #{message}"
emit(:error, ProtocolError.new(message))
@ready_state = 3
emit(:error, ProtocolError.new(message))
emit(:close, CloseEvent.new(ERRORS[:protocol_error], message))
end

Expand Down

0 comments on commit f1fd96e

Please sign in to comment.