Messages should be queued when the client is in the 'pre-connecting' state, as the client is initially.

This commit is contained in:
James Coglan
2013-06-06 10:25:10 +01:00
parent ae84f0eaf7
commit ee5fe9ec5f
+1 -1
View File
@@ -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