Skip to content

Commit

Permalink
Port the change from 51eaf0b to Ruby.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Jun 11, 2016
1 parent b5ac24b commit ec60c02
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/faye/transport/web_socket.rb
Expand Up @@ -97,15 +97,13 @@ def connect
@socket = nil
@state = UNCONNECTED
remove_timeout(:ping)
set_deferred_status(:unknown)

pending = @pending ? @pending.to_a : []
@pending = nil

if was_connected
handle_error(pending, true)
elsif @ever_connected
handle_error(pending)
if was_connected or @ever_connected
set_deferred_status(:unknown)
handle_error(pending, was_connected)
else
set_deferred_status(:failed)
end
Expand Down

0 comments on commit ec60c02

Please sign in to comment.