From ee5fe9ec5f2b98c0a7b67a3406c5eaa0dbc4e992 Mon Sep 17 00:00:00 2001 From: James Coglan Date: Thu, 6 Jun 2013 10:25:10 +0100 Subject: [PATCH] Messages should be queued when the client is in the 'pre-connecting' state, as the client is initially. --- lib/websocket/driver/hybi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/websocket/driver/hybi.rb b/lib/websocket/driver/hybi.rb index 01d952a..3bc0b97 100644 --- a/lib/websocket/driver/hybi.rb +++ b/lib/websocket/driver/hybi.rb @@ -103,7 +103,7 @@ module WebSocket end def frame(data, type = nil, code = nil) - return queue([data, type, code]) if @ready_state == 0 + return queue([data, type, code]) if @ready_state <= 0 return false unless @ready_state == 1 data = data.to_s unless Array === data