We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d899d1 commit 54dafbfCopy full SHA for 54dafbf
lib/em-websocket/connection.rb
@@ -118,7 +118,7 @@ def dispatch(data)
118
debug [:error, e]
119
trigger_on_error(e)
120
# Handshake errors require the connection to be aborted
121
- abort
+ abort(:handshake_error)
122
}
123
124
handshake
@@ -261,7 +261,8 @@ def close_timeout
261
262
# As definited in draft 06 7.2.2, some failures require that the server
263
# abort the websocket connection rather than close cleanly
264
- def abort
+ def abort(reason)
265
+ debug [:abort, reason]
266
close_connection
267
end
268
@@ -271,7 +272,7 @@ def close_websocket_private(code, body)
271
272
@handler.close_websocket(code, body)
273
else
274
# The handshake hasn't completed - should be safe to terminate
275
+ abort(:handshake_incomplete)
276
277
278
0 commit comments