aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2016-01-28 22:46:33 +1030
committerMatthew Draper <matthew@trebex.net>2016-01-30 03:46:37 +1030
commit4d01cd1545a00ed6f96d6cb658a590afd36e1871 (patch)
treefd7558a9a27970c7d494a6768bac25361a808cd6 /actioncable/test
parent3043601d7ab4a3b0e7eea1c6353ab96258f8a78c (diff)
downloadrails-4d01cd1545a00ed6f96d6cb658a590afd36e1871.tar.gz
rails-4d01cd1545a00ed6f96d6cb658a590afd36e1871.tar.bz2
rails-4d01cd1545a00ed6f96d6cb658a590afd36e1871.zip
Keep the socket reference after close
We may still try to send to it.
Diffstat (limited to 'actioncable/test')
-rw-r--r--actioncable/test/client_test.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actioncable/test/client_test.rb b/actioncable/test/client_test.rb
index 4629d858a1..3d9690fb01 100644
--- a/actioncable/test/client_test.rb
+++ b/actioncable/test/client_test.rb
@@ -66,8 +66,8 @@ class ClientTest < ActionCable::TestCase
yield port
ensure
- server.stop(true)
- t.join
+ server.stop(true) if server
+ t.join if t
end
def start_event_machine
@@ -135,7 +135,6 @@ class ClientTest < ActionCable::TestCase
end
@ws.on(:close) do |event|
- @ws = nil
em_controller.stop_event_machine
@closed.set
end